コード例 #1
0
 public ActionResult Create(TransactionViewModel model)
 {
     if (ModelState.IsValid)
     {
         var result = Service.CreateTransaction(model.ToServiceModel(), ((OwnerModel)Session["SelectedAccount"]).Id);
         if (result)
         {
             return(RedirectToAction("List"));
         }
         ModelState.AddModelError("", "Request could not be completed");
     }
     OnCreate();
     return(View(model));
 }