Example #1
0
 public ActionResult Create(InvoiceDetail invoicedetail)
 {
     if (ModelState.IsValid)
     {
         invoicedetailRepository.InsertOrUpdate(invoicedetail);
         invoicedetailRepository.Save();
         return(RedirectToAction("Index"));
     }
     else
     {
         ViewBag.PossibleInvoices = invoiceRepository.All;
         ViewBag.PossibleProducts = productRepository.All;
         return(View());
     }
 }