当前位置: 首页>>代码示例>>C#>>正文


C# SysUserBLL.GetFlowUserByUserID方法代码示例

本文整理汇总了C#中SysUserBLL.GetFlowUserByUserID方法的典型用法代码示例。如果您正苦于以下问题:C# SysUserBLL.GetFlowUserByUserID方法的具体用法?C# SysUserBLL.GetFlowUserByUserID怎么用?C# SysUserBLL.GetFlowUserByUserID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SysUserBLL的用法示例。


在下文中一共展示了SysUserBLL.GetFlowUserByUserID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetFlowUserByUserID

 public List<FlowUserInfo> GetFlowUserByUserID(string userID)
 {
     using (SysUserBLL bll = new SysUserBLL())
     {
         Tracer.Debug("流程调用了GetFlowUserByUserID:" + "用户ID:" + userID );
         return bll.GetFlowUserByUserID(userID);
     }
 }
开发者ID:fuhongliang,项目名称:oa,代码行数:8,代码来源:PermissionService.svc.cs

示例2: FlowUser

        public FlowUser(string companyid, string userid,  string modelCode)
        {
            string names = "";
            try
            {
                ModelInfo modelinfo = new ModelInfo();
                List<SMT.HRM.CustomModel.Permission.FlowUserInfo> Users = new List<HRM.CustomModel.Permission.FlowUserInfo>();
                #region ModelInfo加入缓存
                object modelinfoObj= CacheProvider.GetCache(modelCode);
                if (modelinfoObj != null)
                {
                    modelinfo = (ModelInfo)modelinfoObj;
                    Tracer.Debug("从缓存中获取 ModelInfo");
                }
                else
                {
                    Tracer.Debug("从数据库获取 通过模块代码查询系统代码 开始 modelCode=" + modelCode);

                    modelinfo = FlowBLL.GetSysCodeByModelCode( modelCode);//对数据库操作
                    if (modelinfo != null)
                    {
                        CacheProvider.RemoveCache(modelCode);
                        CacheProvider.Add(modelCode, modelinfo);
                    }
                    else
                    {
                        Tracer.Debug("从数据库获取 通过模块代码查询系统代码 结果为空");
                    }
                    Tracer.Debug("从数据库获取 通过模块代码查询系统代码 结束 modelCode=" + modelCode);
                }
                #endregion
                this.ModelCode = modelCode;
                if (modelinfo != null)
                {
                    this.ModelName = modelinfo.ModelName;
                    this.SysCode = modelinfo.SysCode;
                }
                #region FlowUserInfo加入缓存
                object FlowUserInfoObj = CacheProvider.GetCache(userid);
                if (FlowUserInfoObj != null)
                {
                    Users = (List<SMT.HRM.CustomModel.Permission.FlowUserInfo>)FlowUserInfoObj;
                    Tracer.Debug("从缓存中获取 FlowUserInfo");
                }
                else
                {
                    Tracer.Debug("从数据库获取 FlowUserInfo 开始 userid=" + userid);
                    using (SysUserBLL bll = new SysUserBLL())
                    {
                        Tracer.Debug("流程调用了GetFlowUserByUserID:" + "用户ID:" + userid);
                        Users = bll.GetFlowUserByUserID(userid);
                    }
                    if (Users != null)
                    {
                        CacheProvider.RemoveCache(userid);
                        CacheProvider.Add(userid, Users);
                    }
                    Tracer.Debug("从数据库获取 FlowUserInfo  结束 userid=" + userid);
                }
                #endregion

                foreach (var user in Users)
                {
                    if (user.CompayID == companyid)
                    {
                        names += "公司ID=" + user.CompayID+"\r\n";
                        names += "部门ID="  + user.DepartmentID+"\r\n";
                        names += "岗位ID="  + user.PostID+"\r\n";
                        names += "用户ID="  + user.UserID+"\r\n";

                        names += "公司名称="  + user.CompayName+"\r\n";
                        names += "部门名称="  +  user.DepartmentName+"\r\n";
                        names += "岗位名称=" +  user.PostName+"\r\n";
                        names += "用户名称=" + user.EmployeeName+"\r\n";

                        #region 用户基本信息
                        this.CompayID = user.CompayID;
                        this.DepartmentID = user.DepartmentID;
                        this.PostID = user.PostID;
                        this.UserID = user.UserID;

                        this.CompayName = user.CompayName;
                        this.DepartmentName = user.DepartmentName;
                        this.PostName = user.PostName;
                        this.UserName = user.EmployeeName;
                        this.Roles = new List<TM_SaaS_OA_EFModel.T_SYS_ROLE>();
                        foreach (var role in user.Roles)
                        {
                            if (role != null)
                            {
                                names += "角色ID=" + role.ROLEID + "\r\n";
                                names += "角色名称=" + role.ROLENAME + "\r\n\r\n";
                            }

                            this.Roles.Add(role);
                        }
                        #endregion
                    }
                }
                Tracer.Debug("流程单据所属人身份:\r\n" + names);
//.........这里部分代码省略.........
开发者ID:SaintLoong,项目名称:TMFlow,代码行数:101,代码来源:SubmitUser.cs


注:本文中的SysUserBLL.GetFlowUserByUserID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。