Example #1
0
        public IHttpActionResult SaveUserRole(saur1 userRole)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            bool isDone = UserRoleHelper.SaveUserRole(userRole);

            if (!isDone)
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Example #2
0
        public IHttpActionResult DeleteUserRole(string UserRoleId, int Type)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            bool isDone = UserRoleHelper.DeleteUserRole(UserRoleId, Type);

            if (!isDone)
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Example #3
0
        public IHttpActionResult GetUserRole(string UserRoleId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var myUserRole = UserRoleHelper.GetUserRole(UserRoleId);

            if (myUserRole == null)
            {
                return(InternalServerError());
            }
            return(Ok(myUserRole));
        }