/// <summary> /// 统计按钮点击 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void caculate_Click(object sender, EventArgs e) { this.dataGridView.DataSource = VehicleDao.CaculateTradeYearReport(this.startDate.Value.Date.AddMonths(1 - this.startDate.Value.Month).AddDays(1 - this.startDate.Value.Date.Day).AddMilliseconds(-1), this.endDate.Value.Date.AddYears(1).AddMonths(1 - this.startDate.Value.Month).AddDays(1 - this.endDate.Value.Date.Day).AddMilliseconds(-1)).Tables[0]; }