private void btnDelete_Click(object sender, EventArgs e)
 {
     if (dgvList.CurrentRow == null)
     {
         SOAFramework.Client.Controls.MessageBox.Show(this, "请选择一条数据");
         return;
     }
     if (SOAFramework.Client.Controls.MessageBox.Show(this, "确认删除选中的数据吗?", "删除", MessageBoxButtons.YesNo) == DialogResult.No) return;
     DeleteCustomerRequest request = new DeleteCustomerRequest();
     request.token = this.Token;
     var customer = dgvList.CurrentRow.DataBoundItem as Customer;
     request.id = customer.ID;
     SDKSync<CommonResponse>.CreateInstance(this).Execute(request, Delete_Callback);
 }
Exemplo n.º 2
0
 /// <remarks/>
 public void DeleteCustomerAsync(DeleteCustomerRequest DeleteCustomerRequest, object userState) {
     if ((this.DeleteCustomerOperationCompleted == null)) {
         this.DeleteCustomerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteCustomerOperationCompleted);
     }
     this.InvokeAsync("DeleteCustomer", new object[] {
                 DeleteCustomerRequest}, this.DeleteCustomerOperationCompleted, userState);
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void DeleteCustomerAsync(DeleteCustomerRequest DeleteCustomerRequest) {
     this.DeleteCustomerAsync(DeleteCustomerRequest, null);
 }