Ejemplo n.º 1
0
        // GET: Imparirment/Create
        public ActionResult Create()
        {
            ViewBag.LastNameUser = lastName;
            var model = new ImpairmentViewModel();

            return(View(model));
        }
Ejemplo n.º 2
0
 public ActionResult Delete(int id, ImpairmentViewModel model)
 {
     try
     {
         ImpairmentManager.DeleteImpairment(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(model));
     }
 }
Ejemplo n.º 3
0
 public ActionResult Edit(int id, ImpairmentViewModel model)
 {
     try
     {
         var impairment = Mapper.Map <ImpairmentViewModel, Impairment>(model);
         ImpairmentManager.StoreImpairment(impairment);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(model));
     }
 }
Ejemplo n.º 4
0
 public ActionResult Create(ImpairmentViewModel model)
 {
     ViewBag.LastNameUser = lastName;
     try
     {
         var impairment = Mapper.Map <ImpairmentViewModel, Impairment>(model);
         ImpairmentManager.StoreImpairment(impairment);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 5
0
        // GET: Imparirment/Create
        public ActionResult Create()
        {
            var model = new ImpairmentViewModel();

            return(View(model));
        }