예제 #1
0
 public ActionResult DeleteInline(WithholdingModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             WithholdingHelper.Delete(model.Id.ToString());
             return(PartialView("_List", WithholdingHelper.GetWithholdings(model.SOBId, model.CodeCombinitionId, model.VendorId)));
         }
         catch (Exception e)
         {
             ViewData["EditError"] = e.Message;
         }
     }
     else
     {
         ViewData["EditError"] = "Please, correct all errors.";
     }
     return(PartialView("_List", WithholdingHelper.GetWithholdings(model.SOBId, model.CodeCombinitionId, model.VendorId)));
 }
예제 #2
0
        public ActionResult AddNewInline(WithholdingModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    model.VendorId          = SessionHelper.VendorId;
                    model.SOBId             = SessionHelper.SOBId;
                    model.CodeCombinitionId = SessionHelper.CodeCombinitionId;

                    WithholdingHelper.Save(model);
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            return(PartialView("_List", WithholdingHelper.GetWithholdings(model.SOBId, model.CodeCombinitionId, model.VendorId)));
        }
예제 #3
0
 public ActionResult GetWithholdings(long codeCombinitionId, long vendorId)
 {
     SessionHelper.CodeCombinitionId = codeCombinitionId;
     SessionHelper.VendorId          = vendorId;
     return(PartialView("_List", WithholdingHelper.GetWithholdings(SessionHelper.SOBId, codeCombinitionId, vendorId)));
 }
예제 #4
0
 public ActionResult CreatePartial()
 {
     return(PartialView("_List", WithholdingHelper.GetWithholdings(SessionHelper.SOBId, SessionHelper.CodeCombinitionId, SessionHelper.VendorId)));
 }