Ejemplo n.º 1
0
 private void BtnDelete_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtId.Text))
     {
         frmMessageBoxFillNull frm = new frmMessageBoxFillNull();
         frm.ShowDialog();
     }
     else
     {
         frmMessageBoxDelete frm = new frmMessageBoxDelete();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             int id     = Int32.Parse(txtId.Text);
             int result = serviceDA.deleteCategory(id);
             dgvSearch.AutoGenerateColumns = false;
             dgvSearch.DataSource          = serviceDA.queryAllCategory();
             reiniciar();
             btnModify.Enabled = true;
         }
     }
 }