protected void SaveData() { string strEntryDate = ""; string strStartDate = ""; string strEndDate = ""; if (string.IsNullOrEmpty(txtEntryDate.Text.Trim()) == false) { strEntryDate = Common.ReturnDate(txtEntryDate.Text.Trim()); } if (string.IsNullOrEmpty(txtStartDate.Text.Trim()) == false) { strStartDate = Common.ReturnDate(txtStartDate.Text.Trim()); } if (string.IsNullOrEmpty(txtEndDate.Text.Trim()) == false) { strEndDate = Common.ReturnDate(txtEndDate.Text.Trim()); } if (hfIsUpdate.Value == "Y") { hfId.Value = hfId.Value; } else { hfId.Value = Common.getMaxId("EmpAddResponsibilityLog", "AddResponseId"); } objEmpMgr.InsertAddResponsibility(hfId.Value.ToString(), txtEmpID.Text.Trim(), ddlAction.SelectedValue.ToString(), strEntryDate, strStartDate, strEndDate, txtAmount.Text.Trim(), txtPercent.Text.Trim(), txtResponsibility.Text.Trim(), (chkIsResponseAllowance.Checked == true ? "Y" : "N"), (chkIsRepeat.Checked == true ? "Y" : "N"), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), hfIsUpdate.Value.ToString()); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } this.OpenRecord(); this.EntryMode(false); }