Exemple #1
0
        public BaseResponse <WorkFlowRole> GetWorkFlowRoleInfoById(string id)
        {
            var info = WorkFlowRole.GetInstance(id);

            info.GetDescripUserId();
            return(BaseResponse.getResult(info));
        }
Exemple #2
0
        public ActionResult WorkFlowUserRoleSet(string Id, string pageId)
        {
            ViewBag.pageId = getPageId(pageId);
            var roleInfo = WorkFlowRole.GetInstance(Id);

            roleInfo.GetDescripUserId();
            ViewBag.selectedUserId = roleInfo.DescripUserId;
            return(View("SelectManagerUsers"));
        }
Exemple #3
0
        public BaseResponse DelWorkFlowRoleInfo(string id)
        {
            var info = WorkFlowRole.GetInstance(id);

            info.Delete();

            string      thisUserId = User.Identity.Name;
            UserManager thisUser   = UserManager.getUserById(thisUserId);

            UserLog.create("删除工作流角色配置", "工作流角色", thisUser, info);

            return(BaseResponse.getResult("删除成功"));
        }
Exemple #4
0
        public BaseResponse UpdataWorkFlowRoleDescriptUser(string id, BaseBatchRequest <string> condtion)
        {
            var info = WorkFlowRole.GetInstance(id);

            if (condtion == null)
            {
                condtion = new BaseBatchRequest <string>()
                {
                    rows = new List <string>()
                };
            }
            info.UpdataDescriptUsers(condtion.rows);

            string      thisUserId = User.Identity.Name;
            UserManager thisUser   = UserManager.getUserById(thisUserId);

            UserLog.create("编辑角色用户", "工作流角色", thisUser, info);
            return(BaseResponse.getResult("保存成功"));
        }
Exemple #5
0
        public BaseResponse <List <WorkFlowRole> > EditWorkFlowRoleInfo(BaseBatchRequest <WorkFlowRole> condtion)
        {
            var    result = WorkFlowRole.Edit(condtion.rows);
            string msg    = string.Format("已新增/编辑{0}条数据", result.Count);

            //记录到日志
            string      thisUserId = User.Identity.Name;
            UserManager thisUser   = UserManager.getUserById(thisUserId);
            string      logMsg     = string.Empty;

            foreach (var item in result)
            {
                if (condtion.rows.Select(p => p.Id).Contains(item.Id))
                {
                    logMsg = string.Format("编辑工作流角色信息[{0}]", item.RoleName);
                }
                else
                {
                    logMsg = string.Format("新增工作流角色信息[{0}]", item.RoleName);
                }
                UserLog.create(logMsg, "工作流角色", thisUser, item);
            }
            return(BaseResponse.getResult(result, msg));
        }
Exemple #6
0
 public BaseResponse <BaseResponseList <WorkFlowRole> > GetWorkFlowRoleList(BaseRequest condtion)
 {
     return(BaseResponse.getResult(WorkFlowRole.GetRolsList(condtion)));
 }