Exemple #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            int cid = (this.cmbCategory.SelectedItem as Models.GoodsCategory).Id;

            long begin = TimeStamp.ConvertDateTimeInt(this.dateBegin.Value.Date);
            long end   = TimeStamp.ConvertDateTimeInt(this.dateEnd.Value);

            List <Models.ReportGoodsRank> records = bll.GetStatisticsByCategory(cid, begin, end);

            this.dgvGoodsRank.Rows.Clear();
            if (records == null)
            {
                return;
            }
            foreach (Models.ReportGoodsRank item in records)
            {
                this.dgvGoodsRank.Rows.Add(item.GoodsName, item.Price, item.Count);
            }
        }