示例#1
0
 private void done_del_bt_Click(object sender, EventArgs e)
 {
     medServ = new MedicineService();
     try
     {
         int result = medServ.DeleteMed(Convert.ToInt32(medId_del_tb.Text));
         if (result > 0)
         {
             MessageBox.Show("Medicine Deleted");
             medId_del_tb.Text = "";
             UpdateGridview();
         }
         else
         {
             MessageBox.Show("Please Try Again");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.StackTrace);
     }
 }