Esempio n. 1
0
        /// <summary>
        /// 查询是否使用代理(对服务操作)
        /// </summary>
        /// <param name="ModelCode"></param>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public UserInfo GetAgentUserInfo(string ModelCode, string UserID)
        {
            UserInfo AgentUser = new UserInfo();
            try
            {
                OAWS.AgentServicesClient oa = new OAWS.AgentServicesClient();
                //OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent("TravelApplication1", "da844654-49c4-4138-ad83-e369cf03af5c");
                OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent(UserID, ModelCode);
                if (AGENTSET == null)
                    return null;

                AgentUser.UserID = AGENTSET.EMPLOYEEID;//"userid0";
                AgentUser.UserName = AGENTSET.EMPLOYEECNAME;//"testuser";

                return AgentUser;
            }
            catch (Exception e)
            {

                throw new Exception("GetAgentUserInfo:" + e.Message);
            }
            finally
            {
                AgentUser = null;

            }

        }
Esempio n. 2
0
        /// <summary>
        /// 查找会签角色
        /// </summary>
        /// <param name="ModelCode"></param>
        /// <param name="dictUserInfo"></param>
        /// <returns></returns>
        public Dictionary<UserInfo, UserInfo> GetAgentUserInfo2(string ModelCode, Dictionary<Role_UserType, List<UserInfo>> dictUserInfo)
        {
            Dictionary<UserInfo, UserInfo> dict = new Dictionary<UserInfo, UserInfo>();

            try
            {
                dictUserInfo.Values.ToList().ForEach(users =>
                    {
                        users.ForEach(user =>
                            {
                                UserInfo AgentUser = new UserInfo();
                                OAWS.AgentServicesClient oa = new OAWS.AgentServicesClient();
                                //OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent("TravelApplication1", "da844654-49c4-4138-ad83-e369cf03af5c");
                                OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent(user.UserID, ModelCode);
                                if (AGENTSET != null)
                                {
                                    AgentUser.UserID = AGENTSET.EMPLOYEEID;//"userid0";
                                    AgentUser.UserName = AGENTSET.EMPLOYEECNAME;//"testuser";
                                    dict[user] = AgentUser;
                                }
                            });
                    });


                return dict;
            }
            catch (Exception e)
            {

                throw new Exception("GetAgentUserInfo:" + e.Message);
            }
            finally
            {


            }

        }
Esempio n. 3
0
File: FlowBLL.cs Progetto: JuRogn/OA
        /// <summary>
        /// 查询是否使用代理(对服务操作)
        /// </summary>
        /// <param name="ModelCode"></param>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public UserInfo GetAgentUserInfo(string ModelCode, string UserID)
        {
            UserInfo AgentUser = new UserInfo();
            try
            {
                OAWS.AgentServicesClient oa = new OAWS.AgentServicesClient();
                //OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent("TravelApplication1", "da844654-49c4-4138-ad83-e369cf03af5c");
                OAWS.T_HR_EMPLOYEE AGENTSET = oa.GetQueryAgent(UserID, ModelCode);
                if (AGENTSET == null)
                    return null;

                AgentUser.UserID = AGENTSET.EMPLOYEEID;//"userid0";
                AgentUser.UserName = AGENTSET.EMPLOYEECNAME;//"testuser";

                return AgentUser;
            }
            catch (Exception e)
            {
                
                LogHelper.WriteLog("ModelCode=" + ModelCode + ",UserID=" + UserID + " ;查询是否使用代理出错,异常信息:\r\n" + e.ToString());
                throw new Exception("查询是否使用代理出错,请联系管理员!");
            }
            finally
            {
                AgentUser = null;

            }

        }