public GiaoVienGUI(DTO.HT.GiaoVien GiaoViens) { this.doKhos = doKhoBUS_HT.getAll(); this.cauHois = cauHoiBUS_HT.getAllCauHoiCauHoi(); this.cauHoiHienTai = null; this.newGiaoVien = GiaoViens; this.khois = khoiBUS_HT.GetKhoiAll(); InitializeComponent(); this.LoadListView(); this.loadDoKho(); this.loadDeThiVaKhoi(); this.LoadDanhSachKiThi(); }
private void btnDangNhap_Click(object sender, EventArgs e) { DTO.HT.GiaoVien temp = giaoVienBUS_HT.findGiaoVien(tbEmail.Text, tbMatKhau.Text); if (temp != null) { GiaoVienGUI giaoVien = new GiaoVienGUI(temp); this.Hide(); giaoVien.ShowDialog(); this.Close(); Application.Exit(); } else { //học sinh HocSinhBUS hocSinhBUS = new HocSinhBUS(); try { HocSinh hocSinh = hocSinhBUS.FindOneHocSinh(tbEmail.Text, tbMatKhau.Text); if (hocSinh != null) { HocSinhGUI hocSinhGUI = new HocSinhGUI(hocSinh); this.Hide(); hocSinhGUI.ShowDialog(); this.Close(); Application.Exit(); } else { MessageBox.Show("Bạn đã nhập không chính xác Email hoặc mật khẩu . Xin mời nhập lại", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } catch (Exception Ex) { MessageBox.Show(Ex.Message, "Exception Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public void GETVALUE(DTO.HT.GiaoVien giaoVien) { this.newGiaoVien = giaoVien; }
public CapNhatGiaoVienGUI(DTO.HT.GiaoVien giaoVien) { giaovien = giaoVien; InitializeComponent(); }