Exemple #1
0
 public ActionResult DeletePartial(InvoiceDetailModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             InvoiceModel invoice = SessionHelper.Invoice;
             InvoiceHelper.DeleteInvoiceDetail(model);
             SessionHelper.Invoice = invoice;
             IList <InvoiceDetailModel> invoiceDetail = InvoiceHelper.GetInvoiceDetail();
             return(PartialView("_Detail", invoiceDetail));
         }
         catch (Exception e)
         {
             ViewData["EditError"] = e.Message;
         }
     }
     else
     {
         ViewData["EditError"] = "Please, correct all errors.";
     }
     return(PartialView("_Detail"));
     //return PartialView("_Detail", InvoiceHelper.GetInvoiceDetail());
 }