public void btDelete_Click(object sender, EventArgs e) { string sqlDelete = "DELETE FROM tb_RateExchange WHERE RateID = '" + txtRateID.Text + "'"; classDelete del = new classDelete(); DialogResult i = MessageBox.Show("ທ່ານຕ້ອງການລົບຫົວໜ່ວຍລະຫັນ " + txtRateID.Text + " ແທ້ບໍ່?", "ກະລຸນາຢືນຢັນ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (i == DialogResult.Yes) { del.Delete(sqlDelete, connect.DatabaseConnection(constr)); txtRateID.Text = idauto.SetID(constr, "RateID", "tb_RateExchange", "R000", 1, 4); show.ShowData("SELECT * FROM v_RateExchange", connect.DatabaseConnection(constr), dgvRate); } }
public void btDelete_Click(object sender, EventArgs e) { string sqldeletescript = "Delete from tb_Employee where employeeID = '" + txtEmployeeID.Text + "'"; classDelete del = new classDelete(); DialogResult i = MessageBox.Show("ທ່ານຕ້ອງການທີ່ຈະລົບ " + txtEmployeeID.Text + " ແທ້ບໍ່?", "ກະລຸນາຢືນຢັນ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (i == DialogResult.Yes) { del.Delete(sqldeletescript, connect.DatabaseConnection(constr)); show.ShowData("SELECT * FROM v_Employee", connect.DatabaseConnection(constr), dgvEmployee); } txtEmployeeID.Text = idauto.SetID(constr, "EmployeeID", "tb_Employee", "EP00", 2, 3); }
public void btDelete1_Click(object sender, EventArgs e) { classDelete del = new classDelete(); DialogResult i = MessageBox.Show("ທ່ານຕ້ອງການທີ່ຈະລົບ " + txtID1.Text + " ແທ້ບໍ່?", "ກະລຸນາຢືນຢັນ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (i == DialogResult.Yes) { del.Delete("DELETE FROM tb_FoodAndDrink WHERE FoodID='" + txtID1.Text + "'", connect.DatabaseConnection(constr)); show.ShowData(sqlshow, connect.DatabaseConnection(constr), dgvEmployee); txtID1.Text = autoID.SetID(constr, "FoodID", "tb_FoodAndDrink", "FD00", 2, 3); cleartxt(); } }
public void btDelete_Click(object sender, EventArgs e) { string sqldeletescript = "Delete from tb_boat where boatID = '" + txtBoatID.Text + "'"; classDelete del = new classDelete(); DialogResult i = MessageBox.Show("ທ່ານຕ້ອງການທີ່ຈະລົບ " + txtBoatID.Text + " ແທ້ບໍ່?", "ກະລຸນາຢືນຢັນ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (i == DialogResult.Yes) { del.Delete(sqldeletescript, connect.DatabaseConnection(constr)); selectData.ShowData(sqlshow, connect.DatabaseConnection(constr), dgvboat); } txtBoatID.Text = autoID.SetID(constr, "BoatID", "tb_Boat", "B0", 1, 2); Clear(); }
public void btDelete_Click(object sender, EventArgs e) { string sqlDelete = "DELETE FROM tb_Unit WHERE UnitID='" + txtUnitID.Text + "'"; classDelete de = new classDelete(); DialogResult i = MessageBox.Show("ທ່ານຕ້ອງການລົບຫົວໜ່ວຍລະຫັນ " + txtUnitID.Text + " ແທ້ບໍ່?", "ກະລຸນາຢືນຢັນ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (i == DialogResult.Yes) { de.Delete(sqlDelete, connect.DatabaseConnection(constr)); show.ShowData("SELECT * FROM v_Unit", connect.DatabaseConnection(constr), dgvUnit); } txtUnitID.Text = idauto.SetID(constr, "UnitID", "tb_Unit", "UN00", 2, 3); }