public OnlineUserQueryInfoForm()
        {
            InitializeComponent();
            accessUserService = MainForm.GetAccessUserService();
            validate = false;

            this.dateTimePickerStartDate.Value = System.DateTime.Now.AddMonths(-1);

            // 设置服务名称
            CombItem item = new CombItem("不限", -1);
            this.comboBoxServiceID.Items.Add(item);

            AcmServiceTemplateQueryParam serviceTemplateQueryParam = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceTemplateList = accessUserService.queryServiceTemplateList(serviceTemplateQueryParam);
            if (serviceTemplateList.errorCode == 0)
            {
                if (serviceTemplateList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo serviceTemplate in serviceTemplateList.retAcmServiceTemplateInfoList)
                    {
                        item = new CombItem(serviceTemplate.serviceName, serviceTemplate.serviceId.Value);
                        this.comboBoxServiceID.Items.Add(item);
                    }
                }
               
            }
            else
            {
                MessageBox.Show("无法获取服务列表信息");
            }
            this.comboBoxServiceID.SelectedIndex = 0;

            // 设置用户分组
            this.comboBoxUserGroupId.Items.Add(new CombItem("不限", -1));
            this.comboBoxUserGroupId.SelectedIndex = 0;

            // 设置安全状态
            this.comboBoxSafeState.Items.Add(new CombItem("不限", -1));
            this.comboBoxSafeState.SelectedIndex = 0;

            //设置客户端版本
            this.comboBoxClientVersion.Items.Add("不限");
            this.comboBoxClientVersion.SelectedIndex = 0;

            // 设置客户端语言
            this.comboBoxClientLang.Items.Add("不限");
            this.comboBoxClientLang.SelectedIndex = 0;

            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }
        public ServiceTemplateListForm(UamWebService.MainForm parent)
        {
            InitializeComponent();
            this.MdiParent = parent;

            DataGridViewRowCollection rows = this.dataGridView1.Rows;

            // 设置缺省查询条件
            AcmServiceTemplateQueryParam param = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList resultList = accessUserService.queryServiceTemplateList(param);
            if (resultList.errorCode == 0)
            {
                if (resultList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo templateInfo in resultList.retAcmServiceTemplateInfoList)
                    {
                        String[] row = new String[this.dataGridView1.ColumnCount];
                        row[0] = templateInfo.serviceId.Value.ToString();
                        row[1] = templateInfo.serviceName;
                        if (templateInfo.serviceStatus.Value == 1)
                        {
                            row[2] = "可申请";
                        }
                        else
                        {
                            row[2] = "不可申请";
                        }
                        row[3] = templateInfo.serviceDesc;
                        row[4] = templateInfo.serviceSuffix;
                        row[5] = templateInfo.groupId.Value.ToString();
                        row[6] = templateInfo.safePolicy.Value.ToString();
                        row[7] = templateInfo.ldapPriority.Value.ToString();
                        if (templateInfo.assignAddress.Value == 1)
                        {
                            row[8] = "是";
                        }
                        else
                        {
                            row[8] = "否";
                        }
                        rows.Add(row);

                    }
                }

            }
            else
            {
                MessageBox.Show("查询黑名单列表失败,失败原因为:" + resultList.errorMsg);
            }
        }
        public UserListQueryInfoForm()
        {
            InitializeComponent();
            validate = false;

            // 获取Web服务对象
            platUserService = MainForm.GetPlatUserService();
            accessUserService = MainForm.GetAccessUserService();

            // 设置开始日期查询条件
            this.dateTimePickerCreationStartDate.Value = System.DateTime.Now.AddMonths(-1);
            //this.dateTimePickerLastLogOffStartTime.Value = System.DateTime.Now.AddMonths(-1);

            // 设置服务名称
            CombItem item = new CombItem("不限", -1);
            this.comboBoxServiceID.Items.Add(item);

            AcmServiceTemplateQueryParam serviceTemplateQueryParam = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceTemplateList = accessUserService.queryServiceTemplateList(serviceTemplateQueryParam);
            if (serviceTemplateList.errorCode == 0 )
            {
                if (serviceTemplateList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo serviceTemplate in serviceTemplateList.retAcmServiceTemplateInfoList)
                    {
                        item = new CombItem(serviceTemplate.serviceName, serviceTemplate.serviceId.Value);
                        this.comboBoxServiceID.Items.Add(item);
                    }
                }
            }
            else
            {
                MessageBox.Show("无法获取服务列表信息");
            }
            this.comboBoxServiceID.SelectedIndex = 0;

            // 设置用户分组
            item = new CombItem("不限", -1);
            this.comboBoxUserGroupId.Items.Add(item);
            this.comboBoxUserGroupId.SelectedIndex = 0;

            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }
        public AccessDetailQueryInfoForm()
        {
            InitializeComponent();

            platUserService = MainForm.GetPlatUserService();
            accessUserService = MainForm.GetAccessUserService();

            // 设置用户分组
            this.comboBoxUserGroupId.Items.Add(new CombItem("不限", -1));
            this.comboBoxUserGroupId.SelectedIndex = 0;

            // 设置服务名称
            this.comboBoxServiceID.Items.Add(new CombItem("不限", -1));

            AcmServiceTemplateQueryParam serviceTemplateQueryParam = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceTemplateList = accessUserService.queryServiceTemplateList(serviceTemplateQueryParam);
            if (serviceTemplateList.errorCode == 0)
            {
                if (serviceTemplateList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo serviceTemplate in serviceTemplateList.retAcmServiceTemplateInfoList)
                    {
                        CombItem item = new CombItem(serviceTemplate.serviceName, serviceTemplate.serviceId.Value);
                        this.comboBoxServiceID.Items.Add(item);
                    }
                }
                
            }
            else
            {
                MessageBox.Show("无法获取服务列表信息");
            }
            this.comboBoxServiceID.SelectedIndex = 0;

            // 设置开始时间
            this.dateTimePickerStartTime.Value = System.DateTime.Now.AddMonths(-1);

            // 设置下线原因
            this.comboBoxOfflineCause.Items.Add(new CombItem("不限", -1));
            this.comboBoxOfflineCause.SelectedIndex = 0;
            
            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }
Exemplo n.º 5
0
 /// <remarks/>
 public void queryServiceTemplateListAsync(AcmServiceTemplateQueryParam param0, object userState) {
     if ((this.queryServiceTemplateListOperationCompleted == null)) {
         this.queryServiceTemplateListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnqueryServiceTemplateListOperationCompleted);
     }
     this.InvokeAsync("queryServiceTemplateList", new object[] {
                 param0}, this.queryServiceTemplateListOperationCompleted, userState);
 }
Exemplo n.º 6
0
 /// <remarks/>
 public void queryServiceTemplateListAsync(AcmServiceTemplateQueryParam param0) {
     this.queryServiceTemplateListAsync(param0, null);
 }
        public ApplyServiceForm(String userName)
        {
            InitializeComponent();

            this.buttonCancel.DialogResult = DialogResult.Cancel;
            this.userName = userName;

            // 查询用户已申请的服务
            RetAcmUserService userServiceList = accessUserService.queryAcmUserServiceInfo(userName);
            if (userServiceList.errorCode != 0)
            {
                MessageBox.Show("查询用户申请服务信息失败。");
                return;
            }

            // 查询系统中所有服务列表
            AcmServiceTemplateQueryParam param = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceList = accessUserService.queryServiceTemplateList(param);
            if (serviceList.errorCode != 0)
            {
                MessageBox.Show("查询服务列表信息失败。");
                return;
            }

            DataGridViewRowCollection rows1 = this.dataGridView1.Rows;
            DataGridViewRowCollection rows2 = this.dataGridView2.Rows;


            if (userServiceList.acmUserService != null && userServiceList.acmUserService[0] != null)
            {
                userId = new long[userServiceList.acmUserService.Length];
                int i = 0;
                foreach (AcmUserAppliedService appliedService in userServiceList.acmUserService)
                {
                    String[] row = new String[this.dataGridView1.ColumnCount];
                    row[0] = appliedService.serviceTemplateId.Value.ToString();
                    row[1] = appliedService.serviceName;
                    row[2] = appliedService.serviceSuffix;
                    row[3] = appliedService.userIp;
                    rows1.Add(row);
                    userId[i] = appliedService.serviceTemplateId.Value;
                    i++;
                }
            }

            if (serviceList.retAcmServiceTemplateInfoList != null)
            {
                foreach (RetAcmServiceTemplateInfo serviceInfo in serviceList.retAcmServiceTemplateInfoList)
                {
                    if (serviceInfo.serviceStatus != 1)
                    {
                        continue;
                    }
                    Boolean bSkip = false;
                    String[] row = new String[this.dataGridView2.ColumnCount];
                    long serviceId = serviceInfo.serviceId.Value;
                    if (userServiceList.acmUserService != null && userServiceList.acmUserService[0] != null)
                    {
                        foreach (AcmUserAppliedService appliedService in userServiceList.acmUserService)
                        {
                            if (serviceId == appliedService.serviceTemplateId.Value)
                            {
                                bSkip = true;
                                break;
                            }
                        }
                    }
                    
                    if (!bSkip)
                    {
                        row[0] = serviceInfo.serviceId.Value.ToString();
                        row[1] = serviceInfo.serviceName;
                        row[2] = serviceInfo.serviceSuffix;
                        row[3] = "";
                        row[4] = serviceInfo.assignAddress.Value.ToString();
                        rows2.Add(row);

                    }
                }
            }
        }