示例#1
0
        /// <summary>
        /// 砍价活动列表
        /// </summary>
        public DbQueryResult GetCutDownList(CutDownQuery query)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(" 1=1");
            if (query.State > 0)
            {
                builder.AppendFormat(" AND Status = {0} ", query.State);
            }
            if (!string.IsNullOrEmpty(query.ProductName))
            {
                builder.AppendFormat(" AND ProductName like '%{0}%' ", DataHelper.CleanSearchString(query.ProductName));
            }
            string selectFields = "cutdownid,firstPrice,productid,ProductName,startdate,enddate,maxcount,[status],percutprice,[COUNT],minprice,CurrentCutCount,ISNULL(ProdcutQuantity,0) AS ProdcutQuantity,DisplaySequence,OrderCount";

            return(DataHelper.PagingByTopnotin(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_hishop_cutdown", "CutDownId", builder.ToString(), selectFields));
        }
示例#2
0
文件: CutDowns.cs 项目: tyriankid/WFX
        private void BindCutDown()
        {
            CutDownQuery query = new CutDownQuery
            {
                ProductName = this.productName,
                PageIndex   = this.pager.PageIndex,
                PageSize    = this.pager.PageSize,
                SortBy      = "DisplaySequence",
                SortOrder   = SortAction.Desc
            };
            DbQueryResult cutDownList = PromoteHelper.GetCutDownList(query);

            this.grdCutDownList.DataSource = cutDownList.Data;
            this.grdCutDownList.DataBind();
            this.pager.TotalRecords  = cutDownList.TotalRecords;
            this.pager1.TotalRecords = cutDownList.TotalRecords;
        }
示例#3
0
 public static DbQueryResult GetCutDownList(CutDownQuery query)
 {
     return(new CutDownDao().GetCutDownList(query));
 }