="justify">} = 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);
}
// Del Проізводітеляvoid button11_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} where ({1} = {2});", "manufacturer", "ID", textBox19. Text); = new MySqlDataAdapter (sql, conn); = new MySqlCommandBuilder (da);. Fill (data); = new DataTable (); = String. Format ("select * from {0};", "manufacturer"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView8. Columns [0], ListSortDirection. Ascending);
}
// Add Проізводітеляvoid button10_Click (object sender, EventArgs e)
{sql = String. Format ("insert into {0} (name_manufacturer) values ​​('{1}") "," manufacturer ", textBox18. Text);
{= new MySqlCommand (sql, conn);. ExecuteNonQuery ();
} (Exception ex)
{. Show ("Exception:" + ex. Message);
} = new DataTable (); = String. Format ("select * from {0};", "manufacturer"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView8. Columns [0], ListSortDirection. Ascending);
}
// Del Typevoid button13_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} where ({1} = {2});", "type", "ID", textBox21. Text); = new MySqlDataAdapter (sql, conn); = new MySqlCommandBuilder (da);. Fill (data); = new DataTable (); = String. Format ("select * from {0};", "type"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView9. Columns [0], ListSortDirection. Ascending);
} void button12_Click (object sender, EventArgs e)
{sql = String. Format ("insert into {0} (name_type) values ​​('{1}") "," type ", textBox20. Text);
{= new MySqlCommand (sql, conn);. ExecuteNonQuery ();
} (Exception ex)
{. Show ("Exception:" + ex. Message);
} = new DataTable (); = String. Format ("select * from {0};", "type"); = new MySqlDataAdapter (sql, connStr); = new MySqlCommandBuilder (da);. Fill (data);. DataSource = data;. Sort (dataGridView9. Columns [0], ListSortDirection. Ascending);
} void button14_Click (object sender, EventArgs e)
{= new DataTable (); sql = String. Format ("delete from {0} wher...