Exemplo 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 = int.Parse(txtId.Text);
             serviceDA.deleteStorehouse(id);
             frmSearchStoreHouse fm = Owner as frmSearchStoreHouse;
             fm.dgvSearch.AutoGenerateColumns = false;
             fm.dgvSearch.DataSource          = "";
             this.Close();
         }
     }
 }