Example #1
0
    private void PopulateListBoxes()
    {
        ShowTypes        showTypes = new ShowTypes(_connString);
        List <ShowTypes> lkpShowTypes;

        lkpShowTypes            = showTypes.GetShow_Types();
        lstShowTypes.DataSource = lkpShowTypes;
        lstShowTypes.DataBind();

        ShowYears        showYears = new ShowYears(_connString);
        List <ShowYears> lkpShowYears;

        lkpShowYears            = showYears.GetShow_Years();
        lstShowYears.DataSource = lkpShowYears;
        lstShowYears.DataBind();
    }
Example #2
0
        private void PopulateShowTypes(string val)
        {
            ShowTypes        showTypes    = new ShowTypes(_connString);
            List <ShowTypes> lkpShowTypes = showTypes.GetShow_Types();

            foreach (ShowTypes showType in lkpShowTypes)
            {
                ComboBoxItem item = new ComboBoxItem();
                item.Text  = showType.Description;
                item.Value = showType.Show_Type_ID;

                cboShowType.Items.Add(item);
                if (showType.Show_Type_ID.ToString() == val)
                {
                    cboShowType.Text = showType.Description;
                }
            }
        }