本文整理汇总了C#中Attendance.BAL.Report.UpdateEmergencyDetails方法的典型用法代码示例。如果您正苦于以下问题:C# Report.UpdateEmergencyDetails方法的具体用法?C# Report.UpdateEmergencyDetails怎么用?C# Report.UpdateEmergencyDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attendance.BAL.Report
的用法示例。
在下文中一共展示了Report.UpdateEmergencyDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnUpdateEmergency_Click
protected void btnUpdateEmergency_Click(object sender, EventArgs e)
{
try
{
Attendance.Entities.EmergencyContactInfo objContactInfo = new EmergencyContactInfo();
int UserID = Convert.ToInt32(Session["UserID"]);
int EmployeeID = Convert.ToInt32(hdnUserID.Value);
String strHostName = Request.UserHostAddress.ToString();
string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
objContactInfo.Person1 = txtCn1Name.Text.ToString() == "" ? "" : GeneralFunction.ToProper(txtCn1Name.Text.ToString().Trim());
objContactInfo.P1Address1 = GeneralFunction.ToProperNotes(txtCn1Address1.Text.ToString().Trim());
objContactInfo.P1Address2 = GeneralFunction.ToProperNotes(txtCn1Address2.Text.ToString().Trim());
objContactInfo.Phone1 = txtCn1Phone.Text.ToString().Trim();
objContactInfo.Relation1 = GeneralFunction.ToProperNotes(txtCn1Relation.Text.ToString().Trim());
objContactInfo.Email1 = txtCn1Email.Text.ToString().Trim();
objContactInfo.StateID1 = Convert.ToInt32(ddlCn1State.SelectedItem.Value);
// objContactInfo.Zip1 = txtCn1Zip.Text.Trim();
if (txtCn1Zip.Text != "" && txtCn1Zip.Text.Trim().Length == 4)
{
objContactInfo.Zip1 = "0" + txtCn1Zip.Text.Trim();
}
else
{
objContactInfo.Zip1 = txtCn1Zip.Text.Trim();
}
objContactInfo.Person2 = txtCn2Name.Text.ToString() == "" ? "" : GeneralFunction.ToProper(txtCn2Name.Text.ToString().Trim());
objContactInfo.P2Address1 = GeneralFunction.ToProperNotes((txtCn2Address1.Text.ToString().Trim()));
objContactInfo.P2Address2 = GeneralFunction.ToProperNotes(txtCn2Address2.Text.ToString().Trim());
objContactInfo.Phone2 = txtCn2Phone.Text.ToString().Trim();
objContactInfo.Relation2 = GeneralFunction.ToProperNotes(txtCn2Relation.Text.ToString().Trim());
objContactInfo.Email2 = txtCn2Email.Text.ToString().Trim();
objContactInfo.StateID2 = Convert.ToInt32(ddlCn2State.SelectedItem.Value);
if (txtCn2Zip.Text != "" && txtCn2Zip.Text.Trim().Length == 4)
{
objContactInfo.Zip2 = "0" + txtCn2Zip.Text.Trim();
}
else
{
objContactInfo.Zip2 = txtCn2Zip.Text.Trim();
}
objContactInfo.Person3 = txtCn3Name.Text.ToString() == "" ? "" : GeneralFunction.ToProper(txtCn3Name.Text.ToString().Trim());
objContactInfo.P3Address1 = GeneralFunction.ToProperNotes(txtCn3Address1.Text.ToString().Trim());
objContactInfo.P3Address2 = GeneralFunction.ToProperNotes(txtCn3Address2.Text.ToString().Trim());
objContactInfo.Phone3 = txtCn3Phone.Text.ToString().Trim();
objContactInfo.Relation3 = GeneralFunction.ToProperNotes(txtCn3Relation.Text.ToString().Trim());
objContactInfo.Email3 = txtCn3Email.Text.ToString().Trim();
objContactInfo.StateID3 = Convert.ToInt32(ddlCn3State.SelectedItem.Value);
if (txtCn3Zip.Text != "" && txtCn3Zip.Text.Trim().Length == 4)
{
objContactInfo.Zip3 = "0" + txtCn3Zip.Text.Trim();
}
else
{
objContactInfo.Zip3 = txtCn3Zip.Text.Trim();
}
Attendance.BAL.Report obj = new Report();
obj.UpdateEmergencyDetails(objContactInfo, UserID, EmployeeID, strIp);
//Page.Response.Redirect(HttpContext.Current.Request.Url.ToString(), true);
GetEmpDet(EmployeeID);
mdlEditEmergContactDet.Hide();
}
catch (Exception ex)
{
}
}