Пример #1
0
 public ActionResult Create2(WebApp.Areas.Accounting.Models.ResOrderView collection)
 {
     // TODO: Add insert logic here
     try
     {
         int outputId = _dataobject.Insert(collection);
         ViewBag.OrderId = outputId;
         return(PartialView("UpdateSuccess2", outputId));
     }
     catch (Exception ex)
     {
         WebApp.Areas.Accounting.Services.GlobalErrors.Parse(ModelState, _dataobject.Errors, ex);
         return(PartialView("Update2", collection));
     }
 }
Пример #2
0
 public ActionResult Edit(int Id, WebApp.Areas.Accounting.Models.ResOrderView collection)
 {
     try
     {
         int outputId = _dataobject.Update(collection);
         if (collection.ResOrderItemViews.Count(m => m.OrderItemId == 0) > 0)
         {
             ViewBag.OrderId = outputId;
         }
         return(PartialView("UpdateSuccess", collection.TableId));
     }
     catch (Exception ex)
     {
         WebApp.Areas.Accounting.Services.GlobalErrors.Parse(ModelState, _dataobject.Errors, ex);
         return(PartialView(this._updateview, _dataobject.GetEdit(Id)));
     }
 }