示例#1
0
    public DataTable GetAllLop()
    {
        dl.getConn();
        SqlDataAdapter adap  = new SqlDataAdapter("Select * from LopHoc", ConnectDAL.cnn);
        DataTable      table = new DataTable();

        adap.Fill(table);
        return(table);
    }
示例#2
0
    public DataTable GetAllPhanCong()
    {
        dl.getConn();
        SqlDataAdapter adap  = new SqlDataAdapter("Select * from PhanCongChuNhiem", ConnectDAL.cnn);
        DataTable      table = new DataTable();

        adap.Fill(table);
        return(table);
    }
示例#3
0
    public DataTable GetALop(string malop)
    {
        dl.getConn();
        SqlDataAdapter adap  = new SqlDataAdapter("Select * from HocSinh where MaLop='" + malop + "'", ConnectDAL.cnn);
        DataTable      table = new DataTable();

        adap.Fill(table);
        return(table);
    }
示例#4
0
    public string getQuyen(string taikhoan)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.Connection  = dl.getConn();
        cmd.CommandText = "kiemtraquyen";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@taikhoan", taikhoan);
        string check = (string)cmd.ExecuteScalar();

        return(check);
    }
示例#5
0
    public DataTable GetAllDiem()
    {
        dl.getConn();
        SqlDataAdapter adap  = new SqlDataAdapter("select MaHS,DiemMieng1,DiemMieng2,DiemMieng3,Diem15p1,Diem15p2,Diem15p3,Diem45p1,Diem45p2,Diem45p3 from Diem", ConnectDAL.cnn);
        DataTable      table = new DataTable();

        adap.Fill(table);
        return(table);
    }