/// <summary> /// 免运费信息 /// </summary> /// <param name="filter">免运费信息</param> /// <returns>返回免运费信息</returns> /// <remarks>2016-04-20 王耀发 创建</remarks> public override Pager <CBWhouseFreightFree> GetWhouseFreightFreeList(ParaWhouseFreightFreeFilter filter) { string sql = @"(select w.SysNo as WhSysNo, w.ErpCode,w.WarehouseName,w.BackWarehouseName,wf.* from WhWarehouse w left join WhouseFreightFree wf on wf.WarehouseSysNo = w.SysNo where w.Status = 1 and (@BackWarehouseName is null or w.BackWarehouseName like @BackWarehouseName)) tb "; var dataList = Context.Select <CBWhouseFreightFree>("tb.*").From(sql) .Parameter("BackWarehouseName", "%" + filter.BackWarehouseName + "%"); var dataCount = Context.Select <int>("count(1)").From(sql) .Parameter("BackWarehouseName", "%" + filter.BackWarehouseName + "%"); var pager = new Pager <CBWhouseFreightFree> { CurrentPage = filter.Id, PageSize = filter.PageSize }; var totalRows = dataCount.QuerySingle(); var rows = dataList.OrderBy("tb.LastUpdateDate desc").Paging(pager.CurrentPage, pager.PageSize).QueryMany(); pager.TotalRows = totalRows; pager.Rows = rows; return(pager); }
/// <summary> /// 分页获取仓库免邮费 /// </summary> /// <param name="filter">筛选条件</param> /// <returns>分页列表</returns> /// <remarks>2016-04-20 王耀发 创建</remarks> public Pager <CBWhouseFreightFree> GetWhouseFreightFreeList(ParaWhouseFreightFreeFilter filter) { return(IWhouseFreightFreeDao.Instance.GetWhouseFreightFreeList(filter)); }
/// <summary> /// 免运费信息 /// </summary> /// <param name="filter">免运费信息</param> /// <returns>返回免运费信息</returns> /// <remarks>2016-04-20 王耀发 创建</remarks> public abstract Pager <CBWhouseFreightFree> GetWhouseFreightFreeList(ParaWhouseFreightFreeFilter filter);