/// <summary> /// 获取列表-分页 /// </summary> /// <param name="key"></param> /// <param name="visible"></param> /// <returns></returns> public static List <ShopListEntity> GetPageList(int stationId, int shopType, PageSet pageSet) { string strWhere = string.Empty; if (stationId > 0) { strWhere += string.Format(" StationId={0} AND ", stationId); } if (shopType > 0) { strWhere += string.Format(" ShopType={0} AND ", shopType); } if (!string.IsNullOrEmpty(strWhere)) { strWhere = strWhere.Remove(strWhere.Length - 4, 4); } pageSet.RecordCount = ShopListDAL.SearchCount(strWhere); return(ShopListDAL.Search(strWhere, "Id desc", (pageSet.PageIndex - 1) * pageSet.PageSize, pageSet.PageSize)); }
public static ShopListEntity GetById(int id) { return(ShopListDAL.GetById(id)); }