예제 #1
0
        private DataGridViewModel <Dictionary <string, object> > GetDataList(CountDownQuery query)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (query != null)
            {
                DbQueryResult countDownList = PromoteHelper.GetCountDownList(query);
                dataGridViewModel.rows  = DataHelper.DataTableToDictionary(countDownList.Data);
                dataGridViewModel.total = countDownList.TotalRecords;
                foreach (Dictionary <string, object> row in dataGridViewModel.rows)
                {
                    CountDownInfo countDownInfo = row.ToObject <CountDownInfo>();
                    int           num           = 0;
                    if (countDownInfo.StartDate > DateTime.Now)
                    {
                        num = 1;
                    }
                    else if (countDownInfo.EndDate < DateTime.Now)
                    {
                        num = 2;
                    }
                    row.Add("State", num);
                }
            }
            return(dataGridViewModel);
        }
예제 #2
0
        private void BindCountDown()
        {
            DbQueryResult countDownList = PromoteHelper.GetCountDownList(new GroupBuyQuery
            {
                ProductName = this.productName,
                PageIndex   = this.pager.PageIndex,
                PageSize    = this.pager.PageSize,
                SortBy      = "DisplaySequence",
                SortOrder   = SortAction.Desc
            });

            this.grdCountDownsList.DataSource = countDownList.Data;
            this.grdCountDownsList.DataBind();
            this.pager.TotalRecords  = countDownList.TotalRecords;
            this.pager1.TotalRecords = countDownList.TotalRecords;
        }
예제 #3
0
        private void BindCountDown()
        {
            GroupBuyQuery query = new GroupBuyQuery();

            query.ProductName = productName;
            query.PageIndex   = pager.PageIndex;
            query.PageSize    = pager.PageSize;
            query.SortBy      = "DisplaySequence";
            query.SortOrder   = SortAction.Desc;
            DbQueryResult countDownList = PromoteHelper.GetCountDownList(query);

            grdCountDownsList.DataSource = countDownList.Data;
            grdCountDownsList.DataBind();
            pager.TotalRecords  = countDownList.TotalRecords;
            pager1.TotalRecords = countDownList.TotalRecords;
        }
예제 #4
0
        private void BindCountDown()
        {
            DbQueryResult countDownList = PromoteHelper.GetCountDownList(new GroupBuyQuery
            {
                ProductName = this.productName,
                PageIndex   = this.pager.PageIndex,
                PageSize    = this.pager.PageSize,
                SortBy      = "DisplaySequence",
                SortOrder   = SortAction.Desc,
                SupplierId  = UserHelper.GetAssociatedSupplierId(HiContext.Current.User.UserId)
            });

            this.grdCountDownsList.DataSource = countDownList.Data;
            this.grdCountDownsList.DataBind();
            this.pager.TotalRecords  = countDownList.TotalRecords;
            this.pager1.TotalRecords = countDownList.TotalRecords;
        }