private void SaveData() { long lnId = 0; if (hfIsUpdate.Value == "Y") { lnId = Convert.ToInt64(hfReHiredId.Value); } else { lnId = objDB.GerMaxIDNumber("EmpReHiredLog", "ReHiredId"); } string strEffDate = ""; if (string.IsNullOrEmpty(txtEffDate.Text.Trim()) == false) { strEffDate = Common.ReturnDate(txtEffDate.Text.Trim()); } clsContractExt objReHired = new clsContractExt(txtEmpID.Text.Trim(), lnId.ToString(), ddlAction.SelectedValue.ToString(), strEffDate, Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString())); EmpInfoManager objEmp = new EmpInfoManager(); objEmp.InsertReHiredLog(objReHired, txtPayEmpId.Text.Trim(), ddlAction.SelectedItem.ToString(), hfIsUpdate.Value); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else if (hfIsUpdate.Value == "Y") { lblMsg.Text = "Record Updated Successfully"; } else { lblMsg.Text = ""; } this.OpenRecord(); this.EntryText(); this.EntryMode(false); }
private void SaveData() { if (hfIsUpdate.Value == "Y") { hfContExtId.Value = hfContExtId.Value; } else { hfContExtId.Value = Common.getMaxId("EmpContractExtLog", "ContractExtId"); } string strEffDate = ""; string strContExtDate = ""; if (string.IsNullOrEmpty(txtEffDate.Text.Trim()) == false) { strEffDate = Common.ReturnDate(txtEffDate.Text.Trim()); } if (string.IsNullOrEmpty(txtContExpDate.Text.Trim()) == false) { strContExtDate = Common.ReturnDate(txtContExpDate.Text.Trim()); } clsContractExt objContExt = new clsContractExt(txtEmpID.Text.Trim(), hfContExtId.Value.ToString(), ddlAction.SelectedValue.ToString(), strEffDate, strContExtDate, Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString())); EmpInfoManager objEmp = new EmpInfoManager(); objEmp.InsertContractExtension(objContExt, ddlAction.SelectedItem.ToString(), hfIsUpdate.Value); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else if (hfIsUpdate.Value == "Y") { lblMsg.Text = "Record Updated Successfully"; } this.OpenRecord(); this.EntryMode(false); this.ClearControl(); }