Exemplo n.º 1
0
 void PhanQuyen()
 {
     if (Quyen == 1)
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btLichDay.Visible = btLopDangDay.Visible = false;
         QlLopHoc = new QuanLyLopHoc();
         QlLopHoc.dgLopHoc.CellClick += DgLopHoc_CellClick1;
     }
     else if (Quyen == 2)
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible = false;
         EC_GiaoVien GiaoVien = new BUS_GiaoVien().SelectByFields("ID", ID)[0];
         btAcc.Text  = GiaoVien.Ten_GiaoVien;
         Ma_GiaoVien = GiaoVien.Ma_GiaoVien;
         usLopDay    = new LopDay(Ma_GiaoVien);
         usLopDay.dgLopHoc.CellClick += DgLopHoc_CellClick;
     }
     else if (Quyen == 3)
     {
         btLichDay.Visible             = btLopDangDay.Visible
                                       = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible = false;
         LH_Tuan = new LichHoc_Tuan(ID);
     }
     else
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible
                                                                                                                                                                                  = btLichDay.Visible = btLopDangDay.Visible = false;
     }
 }
Exemplo n.º 2
0
 private void btLichHoc_Click(object sender, EventArgs e)
 {
     Main.Controls.Clear();
     LH_Tuan = new LichHoc_Tuan(ID);
     Main.Controls.Add(LH_Tuan);
     LH_Tuan.btChiTiet.Click += BtChiTiet_Click1;
 }
Exemplo n.º 3
0
 void PhanQuyen()
 {
     if (Quyen == 1)
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btLichDay.Visible = btLopDangDay.Visible = false;
         btGmail.Visible           = true;
         QlLopHoc                  = new QuanLyLopHoc();
         QlLopHoc.btChiTiet.Click += BtChiTiet_Click2;
     }
     else if (Quyen == 2)
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btQl_ThuHocPhi.Visible = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible = false;
         btGmail.Visible = true;
         EC_GiaoVien GiaoVien = new BUS_GiaoVien().SelectByFields("ID", ID)[0];
         btAcc.Text = GiaoVien.Ten_GiaoVien;
         if (GiaoVien.Anh != null)
         {
             picAvt.Image = HinhAnh.ByteToImage(GiaoVien.Anh);
         }
         Ma_GiaoVien = GiaoVien.Ma_GiaoVien;
         usLopDay    = new LopDay(Ma_GiaoVien);
         usLopDay.dgLopHoc.CellClick += DgLopHoc_CellClick;
     }
     else if (Quyen == 3)
     {
         btLichDay.Visible             = btLopDangDay.Visible
                                       = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQl_ThuHocPhi.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible = false;
         btGmail.Visible               = false;
         EC_HocSinh HocSinh = new BUS_HocSinh().SelectByFields("ID", ID)[0];
         btAcc.Text = HocSinh.Ten_HocSinh;
         if (HocSinh.Anh != null)
         {
             picAvt.Image = HinhAnh.ByteToImage(HocSinh.Anh);
         }
         LH_Tuan = new LichHoc_Tuan(ID);
     }
     else
     {
         btDaHocXong.Visible = btDangHoc.Visible = btHocPhi.Visible = btLichHoc.Visible = btLopHoc.Visible
                                                                                              = btQuanLyGiaoVien.Visible = btQuanLyHocSinh.Visible = btQuanLyLopHoc.Visible = btQuanLyTaiKhoan.Visible
                                                                                                                                                                                  = btLichDay.Visible = btLopDangDay.Visible = false;
     }
 }