Ejemplo n.º 1
0
 public ActionResult Insurance(insurance insurInfo, int id)
 {
     string valid = isValid(id);
     if (valid == null)
     {
         return RedirectToAction("Home", "Account");
     }
     if (valid == Permissions.Editor.ToString() || valid == Permissions.Owner.ToString() || valid == Permissions.Admin.ToString())
     {
         if (ModelState.IsValidField("email"))
         {
             insurInfo.estid = id;
             _AddUpdate.addUpdateInsurance(insurInfo);
             return RedirectToAction("Insured", new { id = id });
         }
     }
     return View(insurInfo);
 }
Ejemplo n.º 2
0
        public ActionResult Insurance(int id)
        {
            string valid = isValid(id);
            if (valid == null)
            {
                return RedirectToAction("Home", "Account");
            }
            insurance insurInfo = new insurance();

            insurInfo = _DAOFactory.InsuranceDAO.getById(id);
            return View(insurInfo);
        }