Example #1
0
        // GET: /Forms/Delete/5
        public ActionResult Delete(int id)
        {
            UserPermissionAction("forms", RoleAction.delete.ToString());
            CheckPermission();
            Form form = _FormService.GetForm(id);

            Mapper.CreateMap <EveryWhereCars.Entity.Form, EveryWhereCars.Models.FormModel>();
            EveryWhereCars.Models.FormModel formmodel = Mapper.Map <EveryWhereCars.Entity.Form, EveryWhereCars.Models.FormModel>(form);
            if (formmodel == null)
            {
                return(HttpNotFound());
            }
            return(View(formmodel));
        }
Example #2
0
        // GET: /Forms/Details/5
        public ActionResult Details(int id)
        {
            UserPermissionAction("forms", RoleAction.detail.ToString());
            CheckPermission();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Form form = _FormService.GetForm(id);

            Mapper.CreateMap <EveryWhereCars.Entity.Form, EveryWhereCars.Models.FormModel>();
            EveryWhereCars.Models.FormModel formmodel = Mapper.Map <EveryWhereCars.Entity.Form, EveryWhereCars.Models.FormModel>(form);
            if (formmodel == null)
            {
                return(HttpNotFound());
            }
            return(View(formmodel));
        }