示例#1
0
        public ServiceResponse GetProcessNeedMyApproval(Paging paging)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList());
                result = _processExeService.GetProcessNeedMyApproval(paging, currentUserID);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }

            return(result);
        }
示例#2
0
        public ServiceResponse GetStepExecution(int processExeId)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList());
                result = _processExeService.GetStepExecution(processExeId, currentUserID);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }

            return(result);
        }
示例#3
0
        public ServiceResponse UpdatePassword(UserChangePassword userLogin)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList());
                result = _userService.UpdatePassword(currentUserID, userLogin.OldPassword, userLogin.NewPassword);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#4
0
        public ServiceResponse RejectStep(DataInitProcessExe data)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList());
                result = _processExeService.RejectStep(data, currentUserID);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#5
0
        public ServiceResponse UpdateFirstTimeLogin()
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList());
                result = _userService.UpdateFirstTimeLogin(currentUserID);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#6
0
        public ServiceResponse AddProcess(Process process)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _processService.Add(process, currentUserID, currentUsername);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#7
0
        public ServiceResponse DeleteGroup(int processGroupId)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _processService.DeleteGroup(processGroupId);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#8
0
        public ServiceResponse GetGroupById(int userGroupId)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _userService.GetGroupById(userGroupId);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#9
0
        public ServiceResponse AddUserToGroup(List <UserGroupDetail> listUserGroupDetail)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _userService.AddUserToGroup(listUserGroupDetail, currentUserID, currentUsername);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#10
0
        public ServiceResponse UpdateGroup(UserGroup userGrp)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _userService.UpdateGroup(userGrp, currentUserID, currentUsername);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }
示例#11
0
        public ServiceResponse AddMultiUser(List <UserLogin> listUserLogin)
        {
            ServiceResponse result = new ServiceResponse();

            try
            {
                var currentUserID   = GetCurrentUser.GetUserID(User.Claims.ToList());
                var currentUsername = User.Identity.Name;
                result = _userService.AddMulti(listUserLogin, currentUserID, currentUsername);
            }
            catch (Exception ex)
            {
                result.OnExeption(ex);
            }


            return(result);
        }