Пример #1
0
        private void crv_Range_Load(object sender, EventArgs e)
        {
            BindingSource bs = new BindingSource();

            bs.DataSource = bus.StatisticRange(i_daystart, i_dayend);
            cr_StatisticRangeTime rp = new cr_StatisticRangeTime();

            rp.SetDataSource(bs);
            crv_Range.ReportSource = rp;
            crv_Range.RefreshReport();
        }
Пример #2
0
 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();
     }
 }