private void buttonOK_Click(object sender, EventArgs e)
 {
     if (this.checkedListBox1.CheckedItems.Count == 0)
     {
         MessageBox.Show("请至少选择一个服务。");
         return;
     }
     long[] id = new long[this.checkedListBox1.CheckedItems.Count];
     CancelServiceParam param = new CancelServiceParam();
     int i=0;
     IEnumerator iter = this.checkedListBox1.CheckedItems.GetEnumerator();
     while (iter.MoveNext())
     {
         id[i] = ((CombItem)iter.Current).itemValue;
         i++;
     }
     param.serviceList = new long?[id.Length];
     for (int j = 0; j < id.Length; j++)
    {
         param.serviceList[j] = id[j];
     }
     param.accountName =userName;
     WSCommonResult result = accessUserService.cancelService(param);
     if (result.errorCode == 0)
     {
         MessageBox.Show("用户注销服务成功。");
     }
     else
     {
         MessageBox.Show("用户注销服务失败,失败原因为:" + result.errorMsg);
     }
     this.Dispose(true);
 }
Exemplo n.º 2
0
 /// <remarks/>
 public void cancelServiceAsync(CancelServiceParam param0, object userState) {
     if ((this.cancelServiceOperationCompleted == null)) {
         this.cancelServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OncancelServiceOperationCompleted);
     }
     this.InvokeAsync("cancelService", new object[] {
                 param0}, this.cancelServiceOperationCompleted, userState);
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void cancelServiceAsync(CancelServiceParam param0) {
     this.cancelServiceAsync(param0, null);
 }