static public void refresh(DataGridView datagridview)
{
try
{
if (Connection.State == ConnectionState.Closed)
Connection.Open();
MySqlDataAdapter dataadapter = new MySqlDataAdapter("SELECT * FROM suTable", Connection);
DataTable dt = new DataTable();
dataadapter.Fill(dt);
datagridview.DataSource = dt;
}
catch (MySqlException Exception)
{
MessageBox.Show(Exception.ToString());
}
finally
{
Connection.Close();
}