Beispiel #1
0
 private void btnDel_Click(object sender, EventArgs e)
 {
     if (this.kryptonDataGridView1.SelectedRows.Count > 0)
     {
         var adv = this.kryptonDataGridView1.SelectedRows[0].Tag as AdvModel;
         if (adv == null)
         {
             return;
         }
         var deleteResponse = WebRequestUtil.DeleteAdv(adv.AdvId);
         if (deleteResponse != null)
         {
             bool res = JsonUtil.Deserialize <QSWResponse <bool> >(deleteResponse.Content).Data;
             if (res)
             {
                 this.kryptonDataGridView1.Rows.Remove(this.kryptonDataGridView1.SelectedRows[0]);
                 WebRequestUtil.DeleteAdsImage(adv.AdvImage);
             }
         }
     }
 }