コード例 #1
0
 public ActionResult UpdateInvoices(IPQuotesModel model)
 {
     if (!string.IsNullOrEmpty(model.quote_date_expires_string))
     {
         model.quote_date_expires = DateTime.ParseExact(model.quote_date_expires_string, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
     }
     else
     {
         model.quote_date_expires = DateTime.Now;
     }
     quoteService.UpdateInvoice(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     if (model.payment != null)
     {
         model.payment.quote_id = model.quote_id;
         paymentService.Update(model.payment);
     }
     return(RedirectToAction("Invoices", new { id = model.quote_id }));
 }
コード例 #2
0
ファイル: PurchaseController.cs プロジェクト: SJ-E/AMDSystems
 public ActionResult UpdatePurchase(IPPurchaseModel model)
 {
     //  model.quote_tax_rate.quote_id = model.quote_id;
     //model.quote_amount.quote_id = model.quote_id;
     quoteService.Update(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     if (model.payment != null)
     {
         model.payment.quote_id = model.quote_id;
         paymentService.Update(model.payment);
     }
     //quoteTaxRatesService.Update(model.quote_tax_rate);
     return(RedirectToAction("Purchase", new { id = model.quote_id }));
 }