示例#1
0
        /// <summary>
        /// 开始统计
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void caculate_Click(object sender, EventArgs e)
        {
            this.dataGridView.DataSource = VehicleDao.CaculateTradeDailyReport(this.startDate.Value.Date.AddMilliseconds(-1), this.endDate.Value.Date.AddDays(1).AddMilliseconds(-1), this.dailyCondition.Text).Tables[0];
            this.totalCars.Text          = this.dataGridView.Rows.Count.ToString() + " (辆)";
            int totalMoney = 0;

            for (int a = 0; a < dataGridView.Rows.Count; a++)
            {
                totalMoney += int.Parse(dataGridView.Rows[a].Cells["ActualColumn"].Value.ToString());
            }
            this.totalMoney.Text = totalMoney.ToString() + " (元)";
        }