BudgetAnalyser.LedgerBook.AddLedgerReconciliationController.ShowViewDialog C# (CSharp) Method

ShowViewDialog() public method

Used to show the bank balances involved in this LedgerEntryLine. Only shows balances at this stage, no editing allowed.
public ShowViewDialog ( [ ledgerBook, [ line ) : void
ledgerBook [
line [
return void
        public void ShowViewDialog([NotNull] Engine.Ledger.LedgerBook ledgerBook, [NotNull] LedgerEntryLine line)
        {
            if (ledgerBook == null)
            {
                throw new ArgumentNullException(nameof(ledgerBook));
            }

            if (line == null)
            {
                throw new ArgumentNullException(nameof(line));
            }

            this.parentBook = ledgerBook;
            Date = line.Date;
            BankBalances = new ObservableCollection<BankBalanceViewModel>(line.BankBalances.Select(b => new BankBalanceViewModel(line, b)));
            CreateMode = false;
            AddBalanceVisibility = false;
            Editable = false; // Bank balances are not editable after creating a new Ledger Line at this stage.

            ShowDialogCommon(Editable ? "Edit Bank Balances" : "Bank Balances");
        }