Example #1
0
 public ActionResult Edit(Guid id)
 {
     this.AccountBase.SetupActionAccount();
     BusinessModel businessModel = new BusinessModel(this.AccountBase, id);
     return View(businessModel);
 }
Example #2
0
 public ActionResult Details(Guid businessId, String businessName, String message)
 {
     BusinessModel businessModel = new BusinessModel(this.AccountBase, businessId);
     if (businessModel.IsValid)
     {
         this.AccountBase.SetupActionAccount();
         return View(businessModel);
     }
     else
     {
         this.AccountBase.SetupActionAccount();
         return View();
     }
 }
Example #3
0
 public ActionResult Details(Guid id, String businessName)
 {
     this.AccountBase.SetupActionAccount();
     var bm = new BusinessModel(this.AccountBase, id);
     return View(bm);
 }
Example #4
0
 public ActionResult Edit(Guid id)
 {
     var bm = new BusinessModel(this.AccountBase, id);
     return View(bm);
 }
Example #5
0
        public ActionResult Edit(Guid id, BusinessModel businessModel)
        {
            this.AccountBase.SetupActionAccount();
            try
            {
                if (ModelState.IsValid)
                {
                    var b = AutoMapper.Mapper.Map<ModelEntities.Business, DataEntities.Business>(businessModel.Business);
                    this.AccountBase.BusinessActions.SaveOrUpdateBusiness(b);

                    return RedirectToAction("Index");
                }
                return View(businessModel);
            }
            catch
            {
                return View();
            }
        }