Exemplo n.º 1
0
 internal int InsertAdvanceSalaryDetailsLog(HRM_AdvanceSalaryDetailPrevious_Log aHRM_AdvanceSalaryDetailPrevious_Log)
 {
     try
     {
         _context.HRM_AdvanceSalaryDetailPrevious_Log.AddObject(aHRM_AdvanceSalaryDetailPrevious_Log);
         _context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                int detailId = Convert.ToInt32(hidAdDetailsId.Value);

                //insert previous log
                HRM_AdvanceSalaryDetailPrevious_Log aHRM_AdvanceSalaryDetailsLog = new HRM_AdvanceSalaryDetailPrevious_Log();

                aHRM_AdvanceSalaryDetailsLog.AdvanceSalaryDetailsId = detailId;
                aHRM_AdvanceSalaryDetailsLog.ASCode    = hdfPayCode.Value;
                aHRM_AdvanceSalaryDetailsLog.EID       = txtEID.Text;
                aHRM_AdvanceSalaryDetailsLog.Month     = Convert.ToInt16(hdfMonth.Value);
                aHRM_AdvanceSalaryDetailsLog.Year      = Convert.ToInt16(hdfYear.Value);
                aHRM_AdvanceSalaryDetailsLog.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId;
                aHRM_AdvanceSalaryDetailsLog.EDIT_DATE = DateTime.Now;
                aHRM_AdvanceSalaryDetailsLog.OCODE     = ((SessionUser)Session["SessionUser"]).OCode;

                aAdvanceSalaryBLL.InsertAdvanceSalaryDetailsLog(aHRM_AdvanceSalaryDetailsLog);

                // update advance pay time
                HRM_AdvanceSalaryDetails aHRM_AdvanceSalaryDetails = new HRM_AdvanceSalaryDetails();

                aHRM_AdvanceSalaryDetails.Month     = Convert.ToInt16(ddlMonthList.SelectedValue);
                aHRM_AdvanceSalaryDetails.Year      = Convert.ToInt16(ddlYearList.SelectedValue);
                aHRM_AdvanceSalaryDetails.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId;
                aHRM_AdvanceSalaryDetails.EDIT_DATE = DateTime.Now;
                aHRM_AdvanceSalaryDetails.OCODE     = ((SessionUser)Session["SessionUser"]).OCode;


                int result = aAdvanceSalaryBLL.Update_AdvanceSalaryDetails(aHRM_AdvanceSalaryDetails, detailId);
                if (result == 1)
                {
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Updated Successfully')", true);
                    getEmployeeWiseAdvanceSalaryList();

                    txtEID.Text = "";
                    ddlMonthList.ClearSelection();
                    ddlYearList.ClearSelection();
                    hdfMonth.Value       = "";
                    hdfYear.Value        = "";
                    hidAdDetailsId.Value = "";
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }
Exemplo n.º 3
0
 internal int InsertAdvanceSalaryDetailsLog(HRM_AdvanceSalaryDetailPrevious_Log aHRM_AdvanceSalaryDetailPrevious_Log)
 {
     return(advanceDal.InsertAdvanceSalaryDetailsLog(aHRM_AdvanceSalaryDetailPrevious_Log));
 }