Exemple #1
0
        private void LoadDataGrid(int ledgerTypeID)
        {
            dgvAccountLedger.DataSource = applicationFacade.GetAccountLedgerByLedgerTypeIdAndSearch(ledgerTypeID).OrderBy(p => p.AccountLedgerName).ToList();
            ExtensionMethods.SetGridDefaultProperty(dgvAccountLedger);

            dgvAccountLedger.Columns["AccountLedgerCode"].Visible    = true;
            dgvAccountLedger.Columns["AccountLedgerCode"].HeaderText = "Account No";

            dgvAccountLedger.Columns["AccountLedgerType"].Visible    = true;
            dgvAccountLedger.Columns["AccountLedgerType"].HeaderText = "Ledger Type";

            dgvAccountLedger.Columns["AccountLedgerName"].Visible    = true;
            dgvAccountLedger.Columns["AccountLedgerName"].HeaderText = "Account Name";

            dgvAccountLedger.Columns["AccountType"].Visible    = true;
            dgvAccountLedger.Columns["AccountType"].HeaderText = "Account Type";

            dgvAccountLedger.Columns["OpeningBalance"].Visible    = true;
            dgvAccountLedger.Columns["OpeningBalance"].HeaderText = "Opening Balance";

            dgvAccountLedger.Columns["DebitControlCode"].Visible    = true;
            dgvAccountLedger.Columns["DebitControlCode"].HeaderText = "Debit";

            dgvAccountLedger.Columns["CreditControlCode"].Visible    = true;
            dgvAccountLedger.Columns["CreditControlCode"].HeaderText = "Credit";

            dgvAccountLedger.Columns["StatusText"].Visible    = true;
            dgvAccountLedger.Columns["StatusText"].HeaderText = "Status";

            txtSearch_TextChanged(null, null);
        }