private void btn_quaylai_Click(object sender, EventArgs e) { MainFormAdmin main = new MainFormAdmin(); this.Hide(); main.Show(); }
private void thoat_DSKH_btn_Click(object sender, EventArgs e) { MainFormAdmin main = new MainFormAdmin(); this.Hide(); main.Show(); }
public void checklogin() { if (username.Text == "sa" && password.Text == "123456") { DataTable data = DataProvider.Instance.ExecuteQuery("SELECT * FROM CHINHANH"); if (data.Rows.Count > 0) { MainFormAdmin mainform = new MainFormAdmin(); this.Hide(); mainform.ShowDialog(); } else { MessageBox.Show("Đăng nhập thất bại!"); } } else if (username.Text == "sa" && password.Text == "147258") { DataTable data = DataProvider.Instance.ExecuteQuery("SELECT * FROM CHINHANH"); if (data.Rows.Count > 0) { MainFormAdmin mainform = new MainFormAdmin(); this.Hide(); mainform.ShowDialog(); } else { MessageBox.Show("Đăng nhập thất bại!"); } } else if (username.Text == "sa" && password.Text == "081099") { DataTable data = DataProvider.Instance.ExecuteQuery("SELECT * FROM CHINHANH"); if (data.Rows.Count > 0) { MainFormAdmin mainform = new MainFormAdmin(); this.Hide(); mainform.ShowDialog(); } else { MessageBox.Show("Tài khoản hoặc mật khẩu không đúng. Vui lòng đăng nhập lại!"); } } else { MessageBox.Show("Tài khoản hoặc mật khẩu không đúng. Vui lòng đăng nhập lại!"); } }