///<summary>Called from FormTransactionEdit.</summary> public static DateTime GetReconcileDate(ArrayList journalList) { for (int i = 0; i < journalList.Count; i++) { if (((JournalEntry)journalList[i]).ReconcileNum != 0) { return(Reconciles.GetOne(((JournalEntry)journalList[i]).ReconcileNum).DateReconcile); } } return(DateTime.MinValue); }
private void FormJournalEntryEdit_Load(object sender, System.EventArgs e) { if (EntryCur == null) { MessageBox.Show("Entry cannot be null."); } AccountPicked = Accounts.GetAccount(EntryCur.AccountNum); //might be null /* * for(int i=0;i<Accounts.ListShort.Length;i++) { * comboAccount.Items.Add(Accounts.ListShort[i].Description); * if(Accounts.ListShort[i].AccountNum==EntryCur.AccountNum){ * comboAccount.SelectedIndex=i; * } * } * if(EntryCur.AccountNum !=0 && comboAccount.SelectedIndex==-1){//must be an inactive account * * }*/ FillAccount(); if (EntryCur.DebitAmt > 0) { textDebit.Text = EntryCur.DebitAmt.ToString("n"); } if (EntryCur.CreditAmt > 0) { textCredit.Text = EntryCur.CreditAmt.ToString("n"); } textMemo.Text = EntryCur.Memo; textCheckNumber.Text = EntryCur.CheckNumber; if (EntryCur.ReconcileNum == 0) //not attached { labelReconcile.Visible = false; textReconcile.Visible = false; } else //attached { textReconcile.Text = Reconciles.GetOne(EntryCur.ReconcileNum).DateReconcile.ToShortDateString(); textDebit.ReadOnly = true; textCredit.ReadOnly = true; butDelete.Enabled = false; butChange.Enabled = false; } }