Exemple #1
0
 private void BtnDelete_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtId.Text) || String.IsNullOrEmpty(cboCategory.Text))
     {
         frmMessageBoxFillNull frm = new frmMessageBoxFillNull();
         frm.ShowDialog();
     }
     else
     {
         frmMessageBoxDelete frm = new frmMessageBoxDelete();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             int    id     = Int32.Parse(txtId.Text);
             String name   = txtName.Text;
             int    result = serviceDA.deleteFamily(id);
             dgvSearch.AutoGenerateColumns = false;
             AlmacenDisecWS.category c = (AlmacenDisecWS.category)cboCategory.SelectedItem;
             dgvSearch.DataSource = serviceDA.queryAllFamily(c.category_id);
             reiniciar();
             btnModify.Enabled = true;
         }
     }
 }