Example #1
0
        public ActionResult PayrollAllowancesEdit(PayrollAllowanceMasterDTO Record)
        {
            PayrollAllowanceMasterDTO data = _PayrollAllowanceMasterService.GetPayrollMasterByMasterId(Record.AllowanceMasterId);

            try
            {
                if (!ModelState.IsValid)
                {
                    return(View(data));
                }
                else
                {
                    PayrollAllowanceMasterDTO ReturnRecord = _PayrollAllowanceMasterService.UpdatePayrollAllowance(Record);
                    ViewBag.Success = "Data Updated Successfully";
                    return(View(data));
                }
            }
            catch (Exception Ex)
            {
                ViewBag.Error = Ex.Message;
                return(View(data));
            }
        }
 public ActionResult RetirementFundsEdit(PayrollAllowanceMasterDTO Record)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _PayrollAllowanceMasterService.UpdatePayrollAllowance(Record);
         }
         else
         {
             TempData["Error"] = "Form validation error.";
             return(View());
         }
     }
     catch (Exception Exception)
     {
         TempData["Error"] = Exception.Message;
         return(View());
     }
     TempData["Success"] = "Fund Updated successfully";
     return(RedirectToAction("Index"));
 }