using MySql.Data.MySqlClient; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ekz_lednev { public partial class Form4 : Form { public Form4() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void button5_Click(object sender, EventArgs e) { MessageBox.Show("Эта страница - список поставщиков"); } private void Form4_Load(object sender, EventArgs e) { DB dB = DB.GetInstance(); DataTable dt = new DataTable(); MySqlDataAdapter adp = new MySqlDataAdapter(); MySqlCommand cmd = new MySqlCommand($@" SELECT * From `supplier` ", dB.GetConnection()); adp.SelectCommand = cmd; adp.Fill(dt); dataGridView1.DataSource = dt; } } }