コード例 #1
0
 private async void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "Are you sure you want to remove this policy?",
                         "Remove Policy?", MessageBoxButtons.YesNo) != DialogResult.Yes)
     {
         return;
     }
     ServiceCalls.DeletePolicyHolder(Id);
     if (this.Parent.GetType() == typeof(PolicyHoldersForm))
     {
         ((PolicyHoldersForm)this.Parent).RefreshGrid = true;
     }
     WindowHelper.CloseParent(this);
 }