public static TaiLieuCollection SelectAll() { TaiLieuCollection List = new TaiLieuCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblTaiLieu_Select_SelectAll_linhnx")) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static TaiLieuCollection SelectTop(int Top) { TaiLieuCollection List = new TaiLieuCollection(); SqlParameter[] obj = new SqlParameter[1]; obj[0] = new SqlParameter("Top", Top); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblTaiLieu_Select_SelectTop_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static TaiLieuCollection SelectByDanhMuc(string DM_ID, int Top, string TL_ID) { TaiLieuCollection List = new TaiLieuCollection(); SqlParameter[] obj = new SqlParameter[3]; obj[0] = new SqlParameter("DM_ID", DM_ID); obj[1] = new SqlParameter("Top", Top); obj[2] = new SqlParameter("TL_ID", TL_ID); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblTaiLieu_Select_SelectByDanhMuc_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }