private void BtnDelete_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtCode.Text)) { frmMessageBoxFillNull frm = new frmMessageBoxFillNull(); frm.ShowDialog(); } else { frmMessageBoxDelete frm = new frmMessageBoxDelete(); if (frm.ShowDialog() == DialogResult.OK) { int id = Int32.Parse(txtCode.Text); // s.city = (AlmacenDisecWS.city)cboCity.SelectedItem; // s.city.country = (AlmacenDisecWS.country)cboCountry.SelectedItem; int result = serviceDA.deleteSupplier(id); reiniciar(); frmSearchSupplier fm = Owner as frmSearchSupplier; fm.dgvSearch.AutoGenerateColumns = false; fm.dgvSearch.DataSource = ""; this.Close(); } } }
private void BtnDelete_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtCode.Text)) { frmMessageBoxFillNull frm = new frmMessageBoxFillNull(); frm.ShowDialog(); } else { frmMessageBoxDelete frm = new frmMessageBoxDelete(); if (frm.ShowDialog() == DialogResult.OK) { String name = txtName.Text; reiniciar(); } } }
private void btnEliminarItem_Click(object sender, EventArgs e) { if (dgvItem.SelectedRows.Count > 0) { if (dgvItem.CurrentRow.Cells[0].Value == null) { frmMessageBoxInvalidData frm3 = new frmMessageBoxInvalidData(); frm3.ShowDialog(); } else { frmMessageBoxDelete frm = new frmMessageBoxDelete(); if (frm.ShowDialog() == DialogResult.OK) { dgvItem.Rows.RemoveAt(dgvItem.CurrentRow.Index); } } } }
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); //String name = txtName.Text; ////Category cat = new category(name,0); //Se llama al delete reiniciar(); } } }
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.deleteMeasure_unit(id); dgvSearch.AutoGenerateColumns = false; dgvSearch.DataSource = serviceDA.queryAllMeasurement_Unit(); reiniciar(); btnModify.Enabled = true; } } }
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(); } } }
private void btnDelete_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtCode.Text)) { frmMessageBoxFillNull frm = new frmMessageBoxFillNull(); frm.ShowDialog(); } else { frmMessageBoxDelete frm = new frmMessageBoxDelete(); if (frm.ShowDialog() == DialogResult.OK) { String cod = txtCode.Text; serviceDA.deleteEmployee(cod); frmSearchUser fm = Owner as frmSearchUser; fm.dgvSearch.AutoGenerateColumns = false; fm.dgvSearch.DataSource = serviceDA.queryAllEmployee(); this.Close(); } } }
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; } } }