Exemplo n.º 1
0
        public ActionResult Create(User_Role_Delegation roleDelegation)
        {
            if (ModelState.IsValid)
            {
                var roleDelegationModel  = new RoleDelegationModel();
                var createRoleDelegation = roleDelegationModel.CreateRoleDelegation(roleDelegation.From_User_Id, roleDelegation.To_User_Id, roleDelegation.Date_From, roleDelegation.Date_To);

                if (createRoleDelegation == null)
                {
                    ViewBag.Message = "An Error Occured, Please contact Support";
                    return(View(roleDelegation));
                }

                return(RedirectToAction("Index", "RoleDelegation"));
            }

            return(View(roleDelegation));
        }
Exemplo n.º 2
0
        public ActionResult Create()
        {
            var roleDelegation = new User_Role_Delegation();

            return(View(roleDelegation));
        }