日期:2014-05-18 浏览次数:20807 次
private void b_lookfor_Click(object sender, EventArgs e) { string sql_str = ""; DataTable dt1 = new DataTable(); DataTable dt2 = new DataTable(); fee_conn fee_conn = new fee_conn(); SqlDataAdapter find_do; if (DateTime.Compare(d_end, d_start) > 0) { SqlConnection conn = new SqlConnection(fee_conn.sql_conn()); sql_str = "select * from car_park_fee where car_fee_flag = 1"; find_do = new SqlDataAdapter(sql_str, conn); find_do.Fill(dt1); sql_str = "select * from car_park_fee where car_fee_flag = 2"; find_do = new SqlDataAdapter(sql_str, conn); find_do.Fill(dt2); dt1.Merge(dt2); d_report.Visible = true; d_report.DataSource = dt1; } }