private void LoanBookForm_Load(object sender, EventArgs e) { totalGrid.ColumnHeadersVisible = false; allAccounts = new AllAccounts(DatabaseFactory.Default); allAccounts.StartDate = LoanBookForm.TimelineStartDate; allAccounts.EndDate = LoanBookForm.TimelineEndDate; this.summary = allAccounts.Summary; summaryGrid.DataSource = summary; summaryGrid.DataSourceChanged += new EventHandler(updateTotalGridDataSource); totalGrid.DataSource = allAccounts.SummaryTotal(summaryGrid.DataSource as DataTable); formatGrids(); }
private void LoanBookForm_Load(object sender, EventArgs e) { totalGrid.ColumnHeadersVisible = false; allAccounts = new AllAccounts(DatabaseFactory.Default); allAccounts.StartDate = LoanBookForm.TimelineStartDate; allAccounts.EndDate = LoanBookForm.TimelineEndDate; this.summary = allAccounts.Summary; summaryGrid.DataSource = summary; summaryGrid.DataSourceChanged += new EventHandler(updateTotalGridDataSource); totalGrid.DataSource = allAccounts.SummaryTotal(summaryGrid.DataSource as DataTable); formatGrids(); }
private void updateTotalGridDataSource(object sender, EventArgs e) { totalGrid.DataSource = allAccounts.SummaryTotal((sender as DataGridView).DataSource as DataTable); }