public List <Link> Link_Paging(string CurentPage, string PageSize, string Lang) { List <DataAccess.Link> list = new List <DataAccess.Link>(); DataAccess.Link obj = new DataAccess.Link(); DbCommand cmd = db.GetStoredProcCommand("Links_SelectPage", CurentPage, PageSize, Lang); using (IDataReader dr = db.ExecuteReader(cmd)) { while (dr.Read()) { list.Add(obj.LinkIDataReader(dr)); } dr.Close(); dr.Dispose(); } return(list); }
public List <Link> Link_GetByTop(string Top, string Where, string Order) { List <DataAccess.Link> list = new List <DataAccess.Link>(); DataAccess.Link obj = new DataAccess.Link(); DbCommand cmd = db.GetStoredProcCommand("Links_SelectTop", Top, Where, Order); using (IDataReader dr = db.ExecuteReader(cmd)) { while (dr.Read()) { list.Add(obj.LinkIDataReader(dr)); } dr.Close(); dr.Dispose(); } return(list); }