private void searchPeriod_Click(object sender, EventArgs e) { try { BL.Customer.statementOFAcount soa = new BL.Customer.statementOFAcount(); this.dataGridView1.DataSource = soa.GetStatementPeriod(CustomerNo, Convert.ToDateTime(DateTime1.Value), Convert.ToDateTime(DateTime2.Value)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }