public AcmBlackQueryParam GetQueryParam()
 {
     queryParam = new AcmBlackQueryParam();
     queryParam.accountName = this.textBoxAccountName.Text;
     queryParam.userMacAddress = this.textBoxUserMAC.Text;
     queryParam.userGroupId = ((CombItem)this.comboBoxUserGroupId.SelectedItem).itemValue;
     queryParam.userGroupIdSpecified = true;
     queryParam.joinReason = (int)((CombItem)this.comboBoxJoinReason.SelectedItem).itemValue;
     queryParam.joinReasonSpecified = true;
     queryParam.startDate = this.dateTimePickerStartDate.Value;
     queryParam.startDateSpecified = true;
     queryParam.endDate = this.dateTimePickerEndDate.Value;
     queryParam.endDateSpecified = true;
     queryParam.userStartIpAddress = this.textBoxStartIP.Text;
     queryParam.userEndIpAddress = this.textBoxEndIP.Text;
     return queryParam;
 }
        public BlacklistForm(UamWebService.MainForm parent, AcmBlackQueryParam queryParam)
        {
            InitializeComponent();
            this.MdiParent = parent;

            DataGridViewRowCollection rows = this.dataGridView1.Rows;
            // 设置查询条件
            if (queryParam == null)
            {
                queryParam = new AcmBlackQueryParam();
            }

            // 调用查询接口
            RetAcmBlackInfoList resultList = accessUserService.queryBlackList(queryParam);
            if (resultList.errorCode == 0)
            {
                if (resultList.retAcmBlackInfoList != null)
                {
                    foreach (RetAcmBlackInfo blackInfo in resultList.retAcmBlackInfoList)
                    {
                        String[] row = new String[this.dataGridView1.ColumnCount];
                        row[0] = blackInfo.blackNameId.Value.ToString();
                        row[1] = blackInfo.accountId.Value.ToString();
                        row[2] = blackInfo.accountName;
                        if (blackInfo.joinDate != null)
                        {
                            row[3] = blackInfo.joinDate.Value.ToLocalTime().ToString();
                        }
                        row[4] = blackInfo.joinReason.Value.ToString();
                        row[5] = blackInfo.userIpAddress;
                        row[6] = blackInfo.userMacAddress;
                        rows.Add(row);
                    }
                }
                querySuccess = true; 

            }
            else
            {
                querySuccess = false;
                MessageBox.Show("查询黑名单列表失败,失败原因为:" + resultList.errorMsg);
            }
        }
 /// <remarks/>
 public void queryBlackListAsync(AcmBlackQueryParam param0, object userState) {
     if ((this.queryBlackListOperationCompleted == null)) {
         this.queryBlackListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnqueryBlackListOperationCompleted);
     }
     this.InvokeAsync("queryBlackList", new object[] {
                 param0}, this.queryBlackListOperationCompleted, userState);
 }
 /// <remarks/>
 public void queryBlackListAsync(AcmBlackQueryParam param0) {
     this.queryBlackListAsync(param0, null);
 }
        // 更新列表
        public void updateList()
        {
            DataGridViewRowCollection rows = this.dataGridView1.Rows;
            rows.Clear();
            // 设置查询条件
            AcmBlackQueryParam queryParam = new AcmBlackQueryParam();
            queryParam.joinReason = MainForm.VALUE_UNLIMITE;
            queryParam.joinReasonSpecified = true;
            queryParam.userGroupId = MainForm.VALUE_UNLIMITE;
            queryParam.userGroupIdSpecified = true;

            // 调用查询接口
            RetAcmBlackInfoList resultList = accessUserService.queryBlackList(queryParam);
            if (resultList.errorCode == 0)
            {
                if (resultList.retAcmBlackInfoList != null)
                {
                    foreach (RetAcmBlackInfo blackInfo in resultList.retAcmBlackInfoList)
                    {
                        String[] row = new String[this.dataGridView1.ColumnCount];
                        row[0] = blackInfo.blackNameId.Value.ToString();
                        row[1] = blackInfo.accountId.Value.ToString();
                        row[2] = blackInfo.accountName;
                        if (blackInfo.joinDate != null)
                        {
                            row[3] = blackInfo.joinDate.Value.ToLocalTime().ToString();
                        }
                        row[4] = blackInfo.joinReason.Value.ToString();
                        row[5] = blackInfo.userIpAddress;
                        row[6] = blackInfo.userMacAddress;
                        rows.Add(row);
                    }
                    querySuccess = true;
                }


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