本文整理汇总了C#中Domain.GetDomainOIDByDomainName方法的典型用法代码示例。如果您正苦于以下问题:C# Domain.GetDomainOIDByDomainName方法的具体用法?C# Domain.GetDomainOIDByDomainName怎么用?C# Domain.GetDomainOIDByDomainName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain.GetDomainOIDByDomainName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ButtonSubmit_Click
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
try
{
Interventions interventions = new Interventions();
Domain domain = new Domain();
int DomainIOD = domain.GetDomainOIDByDomainName(DropDownListDomain.SelectedItem.ToString());
interventions.DomainOID = DomainIOD;
//int strInterventionOID = interventions.GetInterventionOIDByInterventionName(DropDownListIntervention .SelectedItem .ToString ());
interventions.InterventionName = txtIntervention .Text;
if (DomainIOD != null && txtIntervention.Text != null&&txtIntervention.Text !="")
{
interventions.AddDomainInterventions();
Label1.Text = "Successfuly Saved";
}
else
{
Label1.Text = "Not Saved";
}
}
catch (Exception ex)
{
}
}
示例2: ButtonSubmit_Click
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
try
{
if((string.IsNullOrEmpty(TextBoxLatestAction.Value)) || (string.IsNullOrEmpty(TextBoxLatestContact.Value)))
{
LabelStatus.Text = "Please Enter Action and Contact Date";
return;
}
int studentid = 0;
bool isNew = false;
int roid = Convert.ToInt32(ViewState["riskOID"].ToString());
RiskCalculation rcal = new RiskCalculation();
Interventions interventions = new Interventions();
interventions = interventions.GetInterventionByRiskOID(roid);
rcal = rcal.GetAssessmentOIDByRiskOID(roid);
if (interventions == null)
{
isNew = true;
interventions = new Interventions();
}
int aoid = rcal.AssessmentOID;
interventions.AssessmentOID = aoid;
int strInterventionOID = interventions.GetInterventionOIDByInterventionName(DropDownListIntervention.SelectedItem.ToString());
interventions.InterventionOID = strInterventionOID;
Domain domain = new Domain();
int DomainIOD = domain.GetDomainOIDByDomainName(DropDownListDomain.SelectedItem.ToString());
interventions.DomainOID = DomainIOD;
User user = new User();
int UserIOD = user.GetUserOIDByUserName(DropDownListAdvocate.SelectedItem.ToString());
//int UserIOD = 1;
interventions.UserOID = UserIOD;
interventions.RiskOID = roid;
//Student student = new Student();
//int StudentOID = student.GetStudentOIDByStudentBannerID(studentid);
interventions.StudentOID = studentid;
interventions.LatestActionDate = TextBoxLatestAction.Value.ToString();
interventions.LatestContact = TextBoxLatestContact.Value.ToString();
interventions.CreatedBy = (Session["CurrentUser"] != null) ? ((User)Session["CurrentUser"]).UserOID : 0;
if (CheckBoxListLeft.Items[0].Selected)
{
interventions.Urgent = 1;
}
else
{
interventions.Urgent = 0;
}
if (CheckBoxListLeft.Items[1].Selected)
{
interventions.Internal = 1;
}
else
{
interventions.Internal = 0;
}
if (CheckBoxListLeft.Items[2].Selected)
{
interventions.Prescribed = 1;
}
else
{
interventions.Prescribed = 0;
}
if (CheckBoxListLeft.Items[3].Selected)
{
interventions.Participating = 1;
}
else
{
interventions.Participating = 0;
}
if (CheckBoxListLeft.Items[4].Selected)
{
interventions.Completed = 1;
}
else
{
interventions.Completed = 0;
}
if (CheckBoxListRight.Items[0].Selected)
{
interventions.Email = 1;
}
else
{
interventions.Email = 0;
}
if (CheckBoxListRight.Items[1].Selected)
{
interventions.Telephone = 1;
}
else
//.........这里部分代码省略.........
示例3: ButtonSubmit_Click
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
try
{
if ((string.IsNullOrEmpty(TextBoxLatestAction.Value)) || (string.IsNullOrEmpty(TextBoxLatestContact.Value)))
{
LabelStatus.Text = "Please Enter Action and Contact Date";
return;
}
Interventions interventions = new Interventions();
//Changed by Babul 20111103
//int strInterventionOID = interventions.GetInterventionOIDByInterventionName(DropDownListIntervention.SelectedItem.ToString());
int strInterventionOID = 0;
if (DropDownListIntervention.SelectedIndex == -1)
{
strInterventionOID = 1;
}
else
{
strInterventionOID = interventions.GetInterventionOIDByInterventionName(DropDownListIntervention.SelectedItem.ToString());
}
//
interventions.InterventionOID = strInterventionOID;
Domain domain=new Domain ();
int DomainIOD = domain.GetDomainOIDByDomainName(DropDownListDomain.SelectedItem.ToString());
interventions.DomainOID = DomainIOD;
User user = new User();
int UserIOD = user.GetUserOIDByUserName(DropDownListAdvocate.SelectedItem.ToString());
interventions.UserOID = UserIOD;
if (ViewState["POID"] == null)
{
studentid = Session["StudentID"].ToString();
Student student = new Student();
int StudentOID = student.GetStudentOIDByStudentBannerID(studentid);
interventions.StudentOID = StudentOID;
ViewState["studentID"]=studentid;
}
else
{
interventions.StudentOID = Convert.ToInt32(ViewState["studentID"]);
}
//interventions.LatestActionDate = TextBoxLatestAction.Text.ToString();
//interventions.LatestContact = TextBoxLatestContact.Text.ToString();
interventions.LatestActionDate = TextBoxLatestAction.Value.ToString();
interventions.LatestContact = TextBoxLatestContact.Value.ToString();
interventions.CreatedBy = (Session["CurrentUser"] != null) ? ((User)Session["CurrentUser"]).UserOID : 0;
if (CheckBoxListLeft.Items[0].Selected)
{
interventions.Urgent = 1;
}
else
{
interventions.Urgent = 0;
}
if (CheckBoxListLeft.Items[1].Selected)
{
interventions.Internal = 1;
}
else
{
interventions.Internal = 0;
}
if (CheckBoxListLeft.Items[2].Selected)
{
interventions.Prescribed = 1;
}
else
{
interventions.Prescribed = 0;
}
if (CheckBoxListLeft.Items[3].Selected)
{
interventions.Participating = 1;
}
else
{
interventions.Participating = 0;
}
if (CheckBoxListLeft.Items[4].Selected)
{
interventions.Completed = 1;
}
else
{
interventions.Completed = 0;
}
if (CheckBoxListRight.Items[0].Selected)
{
interventions.Email = 1;
}
else
//.........这里部分代码省略.........