Exemplo n.º 1
0
        public List<T_SYS_ROLE> GetRoleInfosByUser(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string flagState, LoginUserInfo loginUserInfo)//0待审核  1已审核
        {
            SysRoleBLL roleBll = new SysRoleBLL();
            
            //using (ApprovalManagementBll approvalBll = new ApprovalManagementBll())
            //{
            if (flagState != "4")//草稿,审核完成(已过,未过)   建立人操作
            {
                IQueryable<T_SYS_ROLE> approvalList = roleBll.GetUserRoleByUser(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, loginUserInfo.userID, null, flagState);
                if (approvalList == null)
                {
                    return null;
                }
                else
                {
                    return approvalList.ToList();
                }
            }
            else//审批人
            {
                //SMT.SaaS.BLLCommonServices.BllCommonUserPermissionWS.BllCommonPermissionServicesClient ServiceClient = new BLLCommonServices.BllCommonUserPermissionWS.BllCommonPermissionServicesClient();

                //ServiceClient workFlowWS = new ServiceClient();
                string isView = "1";
                if (flagState == "4")
                {
                    isView = "0";
                }
                //FLOW_FLOWRECORDDETAIL_T[] flowList = workFlowWS.GetFlowInfo("", "", "", isView, "T_SYS_ROLEAPP", loginUserInfo.companyID, loginUserInfo.userID);
                //if (flowList == null)
                //{
                //    return null;
                //}
                List<string> guidStringList = new List<string>();
                //foreach (FLOW_FLOWRECORDDETAIL_T f in flowList)
                //{
                //    guidStringList.Add(f.FLOW_FLOWRECORDMASTER_T.FORMID);
                //}
                //if (guidStringList.Count < 1)
                //{
                //    return null;
                //}
                IQueryable<T_SYS_ROLE> approList = roleBll.GetUserRoleByUser(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, loginUserInfo.userID, guidStringList, flagState);
                if (approList == null)
                {
                    return null;
                }
                else
                {
                    return approList.ToList();
                }
            }
        }