示例#1
0
        /// <summary>
        /// 获取单位及其负责人列表
        /// </summary>
        /// <returns></returns>
        public List<SMSInfo> GetOrgsAndAdminList()
        {
            // 创建passport.CQGJPassport对象,以实现对Passport数据库的查询
            passport.CQGJPassport passportCQGJ = new CQGJ.passport.CQGJPassport();

            // 定义并获取具有管理员权限的单位负责人列表
            List<passport.User> userOwnRoles = passportCQGJ.GetUserListOwnRole().ToList();

            // 定义短信的基本信息,包括接收短信的组织机构,具体接收短信者的个人信息列表
            List<SMSInfo> orgsAndItsAdminList = new List<SMSInfo>();

            // 构建接收短信机构与其具体负责人的一对一关系,形成orgsAndItsAdminList对象
            foreach (var u in userOwnRoles)
            {
                SMSInfo SMSInfoToDest = new SMSInfo();
                passport.User admin = new CQGJ.passport.User();
                passport.b01 org = new CQGJ.passport.b01();

                string orgCode = passportCQGJ.GetOrgCodeOfUser(u.UserID, true);

                passport.b01 b01 = passportCQGJ.GetOrg(orgCode);

                SMSInfoToDest.Destination = b01;
                SMSInfoToDest.AdminOfOrg = u;

                orgsAndItsAdminList.Add(SMSInfoToDest);

            }

            return orgsAndItsAdminList;
        }
示例#2
0
 /// <remarks/>
 public void SavaUserChangeAsync(User user, object userState) {
     if ((this.SavaUserChangeOperationCompleted == null)) {
         this.SavaUserChangeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSavaUserChangeOperationCompleted);
     }
     this.InvokeAsync("SavaUserChange", new object[] {
                 user}, this.SavaUserChangeOperationCompleted, userState);
 }
示例#3
0
 /// <remarks/>
 public void SavaUserChangeAsync(User user) {
     this.SavaUserChangeAsync(user, null);
 }
示例#4
0
 public bool SavaUserChange(User user) {
     object[] results = this.Invoke("SavaUserChange", new object[] {
                 user});
     return ((bool)(results[0]));
 }