Esempio n. 1
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         string strPID = "";
         Payroll_PaySlipOptionMgr objOptMgr = new Payroll_PaySlipOptionMgr();
         // objOptMgr.InsertpaySlipOption(objOpt, Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()));
         if (hfBPID.Value == "")
         {
             strPID = Common.getMaxId("PayrollBenefitsPolicy", "PID");
         }
         else
         {
             strPID = hfBPID.Value;
         }
         objOptMgr.InsertPayrollBenefitsPolicyData(strPID, ddlBenefitHead.SelectedValue.Trim(), ddlEmpType.SelectedValue.Trim(),
                                                   chkIsPercent.Checked == true ? "Y" : "N", ddlPercentHead.SelectedValue.Trim(), txtValue.Text.Trim(), hfBPID.Value == "" ? "N" : "Y",
                                                   Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()));
         this.OpenBenefitsPolicyRecord();
         hfBPID.Value = "";
         btnAdd.Text  = "Save";
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }