private void SaveData(string IsDelete) { long lngID = 0; try { if (hfIsUpdate.Value == "N") { lngID = objDB.GerMaxIDNumber("LOANTYPE", "LOANTYPEID"); } else { lngID = Convert.ToInt32(hfID.Value); } Payroll_LoanType objLoanType = new Payroll_LoanType(lngID.ToString(), txtName.Text.Trim(), txtDescription.Text.Trim(), ddlSalaryHead.SelectedValue.ToString(), (chkInActive.Checked == true ? "N" : "Y"), (chkIsPFLoan.Checked == true ? "Y" : "N"), Common.ReturnZeroForNull(txtMinServiceLife.Text), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N"); objPayrollMgr.InsertLoanType(objLoanType, hfIsUpdate.Value, IsDelete); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }