// private void GUI_Print_Load(object sender, EventArgs e) // { // this.crv_Product.RefreshReport(); // BindingSource bs = new BindingSource(); // bs.DataSource = bus.loadAllListProduct(i_thang, i_nam); // ReportSalesStatistic rp = new ReportSalesStatistic(); // rp.SetDataSource(bs); // crv_Product.ReportSource = rp; // crv_Product.RefreshReport(); // } private void crv_Product_Load(object sender, EventArgs e) { BindingSource bs = new BindingSource(); bs.DataSource = bus.loadAllListProduct(i_thang, i_nam); cr_StatisticMonth rp = new cr_StatisticMonth(); rp.SetDataSource(bs); crv_Product.ReportSource = rp; crv_Product.RefreshReport(); }
private void btnStatistic_Click(object sender, EventArgs e) { if (rbMilestoneTime.Checked) { lstProduct.DataSource = busTK.loadAllListProduct(int.Parse(cboMonth.Text), int.Parse(cboYear.Text)); TotalMoney(); } if (rbDay.Checked) { dtpDate.Text.ToString().Trim(); lstProduct.DataSource = busTK.StatisticDate(DateTime.Parse(dtpDate.Text.ToString().Trim())); TotalMoney(); } if (rbRangeTime.Checked) { lstProduct.DataSource = busTK.StatisticRange(DateTime.Parse(dtpDayStart.Text), DateTime.Parse(dtpDayEnd.Text)); TotalMoney(); } }