Exemplo n.º 1
0
        /// <summary>
        /// 获取当前商品厂家结算价设置的历史列表
        /// </summary>
        /// <param name="search">商品结算价修改历史检索类</param>
        /// <param name="rowCount">记录数</param>
        /// <returns>结果</returns>
        public List <Jinher.AMP.BTP.Deploy.SettlingAccountDTO> GetHistorySettlingAccountExt(Jinher.AMP.BTP.Deploy.CustomDTO.SettlingAccountHistorySearchDTO search, out int rowCount)
        {
            List <Jinher.AMP.BTP.Deploy.SettlingAccountDTO> result = new List <SettlingAccountDTO>();

            if (search == null || search.CommodityId == Guid.Empty || search.PageIndex < 1 || search.PageSize < 1)
            {
                rowCount = 0;
                return(result);
            }

            var query = SettlingAccount.ObjectSet().Where(n => n.CommodityId == search.CommodityId);

            rowCount = query.Count();
            query    = query.OrderByDescending(n => n.SubTime).Skip((search.PageIndex - 1) * search.PageIndex).Take(search.PageSize);

            result = (from q in query
                      select new Jinher.AMP.BTP.Deploy.SettlingAccountDTO
            {
                Id = q.Id,
                CommodityId = q.CommodityId,
                ManufacturerClearingPrice = q.ManufacturerClearingPrice,
                AppId = q.AppId,
                Effectable = q.Effectable,
                EffectiveTime = q.EffectiveTime,
                SubId = q.SubId,
                SubName = q.SubName,
                SubTime = q.SubTime,
                ModifiedOn = q.ModifiedOn,
                UserCode = q.UserCode,
            }).ToList();

            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取当前商品厂家结算价设置的历史列表
 /// </summary>
 /// <param name="search">商品结算价修改历史检索类</param>
 /// <param name="rowCount">记录数</param>
 /// <returns>结果</returns>
 public System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.SettlingAccountDTO> GetHistorySettlingAccount(Jinher.AMP.BTP.Deploy.CustomDTO.SettlingAccountHistorySearchDTO search, out int rowCount)
 {
     base.Do();
     return(this.Command.GetHistorySettlingAccount(search, out rowCount));
 }