. DataSource = data;. Sort (dataGridView4. Columns [0], ListSortDirection. Ascending);
}
// Deleting prodvoid button5_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} where ({1} = {2});", "production", "ID", textBox13. Text); = new MySqlDataAdapter (sql, conn); = new MySqlCommandBuilder (da);. Fill (data); = new DataTable (); = String. Format ("select * from {0};", "v_prod"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView4. Columns [0], ListSortDirection. Ascending);
}
// Shop Delvoid button6_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} where ({1} = {2});", "shop", "ID", textBox14. Text); = new MySqlDataAdapter (sql, conn); = new MySqlCommandBuilder (da);. Fill (data); = new DataTable (); = String. Format ("select * from {0}; & qu ot;, "shop"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView6. Columns [0], ListSortDirection. Ascending);
}
// Shop Addvoid button7_Click (object sender, EventArgs e)
{sql = String. Format ("insert into {0} (name_shop) values ​​('{1}") "," shop ", textBox15. Text);
{= new MySqlCommand (sql, conn);. ExecuteNonQuery ();
} (Exception ex)
{. Show ("Exception:" + ex. Message);
} = new DataTable (); = String. Format ("select * from {0};", "shop"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView6. Columns [0], ListSortDirection. Ascending);
}
// Del Postavvoid button9_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} where ({1} = {2});", "suppliers", "ID", textBox17. Text); = new MySqlDataAdapter (sql, conn); = new MySqlCommandBuilder (da);. Fill (data); = new DataTable (); = String. Format ("select * from {0};", "suppliers"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView7. Columns [0], ListSortDirection. Ascending);
}
// Add Postavvoid button8_Click (object sender, EventArgs e)
{sql = String. Format ("insert into {0} (name_suppliers) values ​​('{1}") "," suppliers ", textBox16. Text);
{= new MySqlCommand (sql, conn);. ExecuteNonQuery ();
} (Exception ex)
{. Show ("Exception:" + ex. Message);