Esempio n. 1
0
 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());
     }
 }
Esempio n. 2
0
        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"));
            }
        }
Esempio n. 3
0
        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"));
            }
        }