示例#1
0
 public ActionResult Create(BusinessCreateEditModel bcm)
 {
     this.AccountBase.SetupActionAccount();
     try
     {
         if (ModelState.IsValid)
         {
             bcm.AccountBase = this.AccountBase;
             if (bcm.SaveOrUpdate())
             {
                 return RedirectToAction("Details", "Business",
                     new { businessId = bcm.Business.Id, message = LocStrings.BusinessCreated });
             }
             else
             {
                 return View(bcm);
             }
         }
         else
         {
             return View(bcm);
         }
     }
     catch
     {
         return View();
     }
 }
示例#2
0
 public ActionResult Create(BusinessCreateEditModel bcm)
 {
     this.AccountBase.SetupActionAccount();
     try
     {
         if (ModelState.IsValid)
         {
             bcm.AccountBase = this.AccountBase;
             if (bcm.SaveOrUpdate())
             {
                 return RedirectToAction("Index");
             }
             else
             {
                 return View(bcm);
             }
         }
         else
         {
             return View(bcm);
         }
     }
     catch
     {
         return View();
     }
 }