public static void CreateAddress(Address address) { String querySql = $"INSERT INTO ADDRESS(iduser,address) VALUES ({address.IdUser},'{address.SAddress}');"; ConnectionDB.ExecuteNonQuery(querySql); }
public static void DeleteUser(int id) { String querySql = $"DELETE FROM APPUSER WHERE iduser = {id};"; ConnectionDB.ExecuteNonQuery(querySql); }
public void ActGrid() { var dt = ConnectionDB.ExecuteQuery("SELECT * FROM BUSINESS;"); dataGridView1.DataSource = dt; }
public static void DeleteBusiness(Business business) { String querySql = $"DELETE FROM BUSINESS WHERE idbusiness = {business.IdBusiness}"; ConnectionDB.ExecuteNonQuery(querySql); }
private void button5_Click(object sender, EventArgs e) { ConnectionDB.ExecuteNonQuery($"DELETE FROM ADDRESS WHERE idAddress = '{comboBox1.SelectedValue}'"); PopulateControls3(); MessageBox.Show("Dirección eliminada"); }
private void button2_Click(object sender, EventArgs e) { ConnectionDB.ExecuteNonQuery($"DELETE FROM APPORDER WHERE idOrder = '{listBox3.SelectedValue}'"); ActGrid(); MessageBox.Show("Orden eliminada"); }