//Đăng Nhập private void btnLogin_Click(object sender, EventArgs e) { if (BUS_Tai_Khoan.Kiem_tra_Tai_Khoan(txtUserName.Text, txtPassWord.Text)) { this.Hide(); if (BUS_Tai_Khoan.Quyen(txtUserName.Text).Contains("HS")) { Hoc_Sinhh hoc_Sinh = BUS_Tai_Khoan.layThongTinTaiKhoan(txtUserName.Text) as Hoc_Sinhh; frmHoc_Sinh.hs = hoc_Sinh; frmHoc_Sinh hs = new frmHoc_Sinh(); hs.ShowDialog(); } else if (BUS_Tai_Khoan.Quyen(txtUserName.Text).Contains("AD")) { Tai_khoan tk = BUS_Tai_Khoan.layThongTinTaiKhoan(txtUserName.Text) as Tai_khoan; frmAdmin.tk = tk; frmAdmin admin = new frmAdmin(); admin.ShowDialog(); } else if (BUS_Tai_Khoan.Quyen(txtUserName.Text).Contains("GV")) { Giao_Vienn tk = BUS_Tai_Khoan.layThongTinTaiKhoan(txtUserName.Text) as Giao_Vienn; frmGiao_Vien.giaoVien = tk; frmGiao_Vien admin = new frmGiao_Vien(); admin.ShowDialog(); } txtPassWord.Clear(); txtUserName.Clear(); } }
//Xem Thông Tin Cá Nhân private void btnInformation_Click(object sender, EventArgs e) { frmThong_Tin thong_Tin = new frmThong_Tin(); thong_Tin.hs_new = hs; thong_Tin.ShowDialog(); hs = BUS_Tai_Khoan.layThongTinTaiKhoan(hs.Tai_Khoan) as Hoc_Sinhh; }
private void frmHoc_Sinh_Load(object sender, EventArgs e) { controlStudent.TabPages.Clear(); hs = BUS_Tai_Khoan.layThongTinTaiKhoan(hs.Tai_Khoan) as Hoc_Sinhh; }