示例#1
0
        private void LoadDataGrid()
        {
            dgvPersonalLedger.DataSource = applicationFacade.GetPersonalLedgers(null).OrderBy(s => s.PersonalLedgerName).ToList();
            ExtensionMethods.SetGridDefaultProperty(dgvPersonalLedger);

            dgvPersonalLedger.Columns["PersonalLedgerCode"].Visible    = true;
            dgvPersonalLedger.Columns["PersonalLedgerCode"].HeaderText = "Account No";

            dgvPersonalLedger.Columns["PersonalLedgerName"].Visible    = true;
            dgvPersonalLedger.Columns["PersonalLedgerName"].HeaderText = "Account Name";

            dgvPersonalLedger.Columns["Address"].Visible    = true;
            dgvPersonalLedger.Columns["Address"].HeaderText = "Address";

            dgvPersonalLedger.Columns["ContactPerson"].Visible    = true;
            dgvPersonalLedger.Columns["ContactPerson"].HeaderText = "Contact Person";

            dgvPersonalLedger.Columns["EmailAddress"].Visible    = true;
            dgvPersonalLedger.Columns["EmailAddress"].HeaderText = "Email";

            txtSearch_TextChanged(null, null);
        }