Пример #1
0
        public static void CreateAddress(Address address)
        {
            String querySql = $"INSERT INTO ADDRESS(iduser,address) VALUES ({address.IdUser},'{address.SAddress}');";

            ConnectionDB.ExecuteNonQuery(querySql);
        }
Пример #2
0
        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;
        }
Пример #4
0
        public static void DeleteBusiness(Business business)
        {
            String querySql = $"DELETE FROM BUSINESS WHERE idbusiness = {business.IdBusiness}";

            ConnectionDB.ExecuteNonQuery(querySql);
        }
Пример #5
0
 private void button5_Click(object sender, EventArgs e)
 {
     ConnectionDB.ExecuteNonQuery($"DELETE FROM ADDRESS WHERE idAddress = '{comboBox1.SelectedValue}'");
     PopulateControls3();
     MessageBox.Show("Dirección eliminada");
 }
Пример #6
0
 private void button2_Click(object sender, EventArgs e)
 {
     ConnectionDB.ExecuteNonQuery($"DELETE FROM APPORDER WHERE idOrder = '{listBox3.SelectedValue}'");
     ActGrid();
     MessageBox.Show("Orden eliminada");
 }