Exemple #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);
                    //Se llama al delete

                    int result = serviceDA.deleteBrand(id);

                    dgvSearch.AutoGenerateColumns = false;
                    dgvSearch.DataSource          = serviceDA.queryAllBrand();
                    reiniciar();
                    btnModify.Enabled = true;
                }
            }
        }