private void linkLabel3_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e) { if (DialogResult.Yes == MessageBox.Show("Log out the account?", "Important", MessageBoxButtons.YesNo)) { this.Hide(); loginui logIn = new loginui(); logIn.Show(); } }
private void custui_Load(object sender, EventArgs e) { loginui a = new loginui(); panel1.Hide(); // TODO: 這行程式碼會將資料載入 'sdpDataSet.orderrecord' 資料表。您可以視需要進行移動或移除。 string connectionString = "datasource=127.0.0.1;port=3306;username=root;password=;database=sdp;"; string query = " SELECT * FROM orderrecord where dealerid = '" + id + "'"; MySqlConnection databaseConnection = new MySqlConnection(connectionString); MySqlCommand commandDatabase1 = new MySqlCommand(query, databaseConnection); MySqlDataAdapter sqlad = new MySqlDataAdapter(commandDatabase1); DataTable dataTable = new DataTable(); databaseConnection.Open(); sqlad.Fill(dataTable); dataGridView1.DataSource = dataTable; }