Example #1
0
        protected void FillContactComboBox(string country)
        {
            if (string.IsNullOrEmpty(country))
            {
                return;
            }

            if (Session["ContactDataSource"] != null)
            {
                ASPxComboBoxContact.DataSource = (Session["ContactDataSource"] as List <CompanyContact>).Where(cont => cont.CompanyID.Equals(Convert.ToInt32(country))).ToList();
                ASPxComboBoxContact.DataBind();
            }
        }
Example #2
0
        private void BindComboBoxes()
        {
            if (Session["CompanyDataSource"] == null)
            {
                Session["CompanyDataSource"] = GenerateCompanyDataSource();
            }
            ASPxComboBoxCompany.DataSource = Session["CompanyDataSource"];
            ASPxComboBoxCompany.DataBind();


            if (Session["ContactDataSource"] == null)
            {
                Session["ContactDataSource"] = GenerateContactDataSource();
            }
            ASPxComboBoxContact.DataSource = Session["ContactDataSource"];
            ASPxComboBoxContact.DataBind();
        }