Exemple #1
0
        private void LoadDataGrid()
        {
            dgvCompanyList.DataSource = applicationFacade.GetCompanies(null).OrderBy(s => s.CompanyName).ToList();
            ExtensionMethods.SetGridDefaultProperty(dgvCompanyList);

            dgvCompanyList.Columns["CompanyCode"].Visible    = true;
            dgvCompanyList.Columns["CompanyCode"].HeaderText = "Company Code";

            dgvCompanyList.Columns["CompanyName"].Visible    = true;
            dgvCompanyList.Columns["CompanyName"].HeaderText = "Company Name";

            dgvCompanyList.Columns["DirectIndirect"].Visible    = true;
            dgvCompanyList.Columns["DirectIndirect"].HeaderText = "Direct/Indirect";

            dgvCompanyList.Columns["OrderPreferenceRating"].Visible    = true;
            dgvCompanyList.Columns["OrderPreferenceRating"].HeaderText = "Order Preference Rating";

            dgvCompanyList.Columns["BillingPreferenceRating"].Visible    = true;
            dgvCompanyList.Columns["BillingPreferenceRating"].HeaderText = "Billing Preference Rating";

            dgvCompanyList.Columns["StockSummaryRequirement"].Visible    = true;
            dgvCompanyList.Columns["StockSummaryRequirement"].HeaderText = "Stock Summary Required";

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

            txtSearch_TextChanged(null, null);
        }