Example #1
0
        public DataTable GetAllClass()
        {
            string query = "SELECT * FROM LOP";

            return(SqlProvider.ExecuteQuery(query));
        }
Example #2
0
        // lấy các lớp thuộc khối
        public DataTable GetClassInGrade(string MaKhoi)
        {
            string query = string.Format("SELECT * FROM LOP JOIN KHOI ON LOP.MaKhoi = KHOI.MaKhoi WHERE LOP.MaKhoi = {0}", MaKhoi);

            return(SqlProvider.ExecuteQuery(query));
        }
Example #3
0
        public DataTable GetGRadeIdbyName(string name)
        {
            string query = string.Format("SELECT * FROM KHOI WHERE {0}", name);

            return(SqlProvider.ExecuteQuery(query));
        }
Example #4
0
        public DataTable GetAllGRade()
        {
            string query = "SELECT * FROM KHOI";

            return(SqlProvider.ExecuteQuery(query));
        }
Example #5
0
        public DataTable GetAllHocSinh()
        {
            string query = "SELECT * FROM HOCSINH";

            return(SqlProvider.ExecuteQuery(query));
        }
Example #6
0
 public void DeleteHocSinh(string id)
 {
     string    query = string.Format("DELETE FROM HOCSINH WHERE MaHocSinh = '{0}'", id);
     DataTable dt    = SqlProvider.ExecuteQuery(query);
 }
Example #7
0
        public DataTable GetAllStudentNotInClass()
        {
            string query = " SELECT * FROM DBO.HOCSINH HS WHERE HS.MaHocSinh NOT IN( SELECT HS1.MaHocSinh FROM DBO.HOCSINH HS1 JOIN PHANLOP PL ON HS1.MaHocSinh = PL.MaHocSinh JOIN LOP L ON L.MaLop = PL.MaLop)";

            return(SqlProvider.ExecuteQuery(query));
        }