Exemple #1
0
 public DataTable get(string id, string pass, string mathi)
 {
     if (CheckService.checkID(id, pass) == 1)
     {
         ThiService tsv = new ThiService();
         return(tsv.get(mathi));
     }
     return(null);
 }
Exemple #2
0
        public DataTable getAllWithTenHocVien(string id, string pass)
        {
            if (CheckService.checkID(id, pass) == 1)//kiểm tra id,pass này có đúng không.
            {
                ThiService tsv = new ThiService();

                return(tsv.getAllWithTenHocVien());
            }
            return(null);
        }
Exemple #3
0
        public DataTable findDiemThiByMaLop(string id, string pass, string malop)
        {
            if (CheckService.checkID(id, pass) == 1)//kiểm tra id,pass này có đúng không.
            {
                ThiService tsv = new ThiService();

                return(tsv.findDiemThiByMaLop(malop));
            }
            return(null);
        }
Exemple #4
0
 public int delete(string id, string pass, string maHV, string maKT, string maLop, int maPhong) //id và pass của nhân viên không phải id và pass của giảng viên
 {
     if (CheckService.checkID(id, pass) == 1)
     {
         if (CheckService.checkRole(id, 2) == 1 || CheckService.checkRole(id, 0) == 1)//kiểm tra id này có quyền delete giảng viên không...
         {
             ThiService tsv = new ThiService();
             return(tsv.delete(maHV, maKT, maLop, maPhong));
         }
     }
     return(0);
 }
Exemple #5
0
        public int insert(string id, string pass, string mahv, string makt, string malop, int maphong, DateTime ngaythi, int diemthi, int ketqua)
        {
            if (CheckService.checkID(id, pass) == 1)
            {
                if (CheckService.checkRole(id, 2) == 1 || CheckService.checkRole(id, 0) == 1)//kiểm tra id này có quyền insert không...
                {
                    if (diemthi > 1000)
                    {
                        return(0);
                    }
                    if (ketqua != 0 && ketqua != 1)
                    {
                        return(0);
                    }

                    ThiService tsv = new ThiService();
                    return(tsv.insert(mahv, makt, malop, maphong, ngaythi, diemthi, ketqua));
                }
            }
            return(0);
        }