public ActionResult Create(StaffFormModel obj, bool continueEditing)
 {
     if (ModelState.IsValid)
     {
         obj.Deleted = false;
         if (obj.Name != null)
         {
             obj.Rename = StringConvert.ConvertShortName(obj.Name);
         }
         Staff item = Mapper.Map <StaffFormModel, Staff>(obj);
         _staffService.CreateStaff(item);
         return(continueEditing ? RedirectToAction("Edit", "Staff", new { id = item.Id })
                          : RedirectToAction("Index", "Staff"));
     }
     else
     {
         return(View("Create", obj));
     }
 }
Ejemplo n.º 2
0
        public ActionResult Create()
        {
            var model = new StaffFormModel();

            return(View(model));
        }