private void btnDangNhap_Click(object sender, EventArgs e) { string tenTaiKhoan = txtTenTaiKhoan.Text; string matKhau = txtMatKhau.Text; if (tenTaiKhoan.Equals("")) { MessageBox.Show("Tài khoản không được để trống", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (matKhau.Equals("")) { MessageBox.Show("Mật khẩu không được để trống", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } DTO_TaiKhoan item = ob.LayTaiKhoan(tenTaiKhoan, matKhau); if (item != null) { GUI_GiaoDienChucNang giaodien = new GUI_GiaoDienChucNang(item); this.Hide(); giaodien.ShowDialog(); } else { MessageBox.Show("Tài khoản hoặc mật khẩu không chính xác", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }
private void btnBack_Click(object sender, EventArgs e) { GUI_GiaoDienChucNang giaodien = new GUI_GiaoDienChucNang(taik); this.Hide(); giaodien.ShowDialog(); }