Ejemplo n.º 1
0
 public ActionResult AddVatClassLineItems(Guid id)
 {
     try
     {
         VatClassLineItemViewModel vcl = new VatClassLineItemViewModel
         {
             id = id
         };
         return View(vcl);
     }
     catch (Exception ex)
     {
         ViewBag.msg = ex.Message;
         return View();
     }
 }
Ejemplo n.º 2
0
        public ActionResult AddVatClassLineItems(VatClassLineItemViewModel vcl)
        { 
         try{
             Guid id = vcl.id;
             decimal addrate=vcl.Rate;
             DateTime? addeffectivedate=vcl.effectiveDate;

             _vatClassLineItemViewModelBuilder.AddVatClassItem(id, addrate, addeffectivedate.Value);
             TempData["msg"] = "VAT line-item Successfully Created";
             _auditLogViewModelBuilder.AddAuditLog(this.User.Identity.Name, "Create", "Vat Class Items", DateTime.Now);
             return RedirectToAction("ListVatClassLineItems", new {@id=vcl.id });
         }
            catch (DomainValidationException dve)
            {
                ValidationSummary.DomainValidationErrors(dve, ModelState);
                ViewBag.msg = dve.Message;
                return View();
            }
            catch (Exception ex)
            {
                ViewBag.msg = ex.Message;
                return View();
            }
        }