Example #1
0
 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();
 }
Example #2
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string       message = string.Format("Are you sure you want to delete this account: {0}?", selectedAccount().Name);
            DialogResult result  = Message.Confirm(message);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                try
                {
                    AllAccounts allAccounts = new AllAccounts(DatabaseFactory.Default);
                    allAccounts.Remove(selectedAccount());
                    refreshForm();
                }
                catch (Exception exception)
                {
                    Message.Error("Unable to delete account.");
                }
            }
        }
Example #3
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string message = string.Format("Are you sure you want to delete this account: {0}?", selectedAccount().Name);
     DialogResult result = Message.Confirm(message);
     if (result == System.Windows.Forms.DialogResult.Yes)
     {
         try
         {
             AllAccounts allAccounts = new AllAccounts(DatabaseFactory.Default);
             allAccounts.Remove(selectedAccount());
             refreshForm();
         }
         catch (Exception exception)
         {
             Message.Error("Unable to delete account.");
         }
     }
 }
Example #4
0
 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();
 }