public ActionResult Create(RoleDto dto) { try { OpRoleInsert op = new OpRoleInsert(); op.Role = dto; op.Role.Uuid = Guid.NewGuid().ToString(); OperationResult rez = _manager.executeOperation(op); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(RoleDto dto) { OpRoleInsert insert = new OpRoleInsert(); insert.Role = dto; var result = _manager.ExecuteOperation(insert); if (result.Status) { return(RedirectToAction("Index")); } else { return(RedirectToAction("Create")); } }
public ActionResult CreateRole(RoleDto dto) { OpRoleInsert op = new OpRoleInsert(); op.RoleDto = dto; OperationResult result = OperationManager.Singleton.ExecuteOperation(op); if (result.Status) { TempData["Success"] = "Added Successfully!"; return(RedirectToAction("Index")); } else { return(RedirectToAction("Create")); } }