private void LoadDDls()
        {
            Pages pages = new Pages();
            pages.LoadAll();
            uiDropDownListPages.DataSource = pages.DefaultView;
            uiDropDownListPages.DataTextField = "ArTitle";
            uiDropDownListPages.DataValueField = "PageID";
            uiDropDownListPages.DataBind();
            uiDropDownListPages.SelectedIndex = 0;

            Categories cats = new Categories();
            cats.GetCategoriesByTypeIDAndPageID(4, Convert.ToInt32(uiDropDownListPages.SelectedValue));
            uiDropDownListAllCategories.DataSource = cats.DefaultView;
            uiDropDownListAllCategories.DataTextField = "Title";
            uiDropDownListAllCategories.DataValueField = "CategoryID";
            uiDropDownListAllCategories.DataBind();
            if (cats.RowCount > 0)
                uiDropDownListAllCategories.SelectedIndex = 0;
        }
Exemplo n.º 2
0
 private void LoadPages()
 {
     Pages objdata = new Pages();
     objdata.LoadAll();
     uiGridViewPages.DataSource = objdata.DefaultView;
     uiGridViewPages.DataBind();
 }
 private void LoadDDls()
 {
     Pages pages = new Pages();
     pages.LoadAll();
     uiDropDownListPages.DataSource = pages.DefaultView;
     uiDropDownListPages.DataTextField = "ArTitle";
     uiDropDownListPages.DataValueField = "PageID";
     uiDropDownListPages.DataBind();
     uiDropDownListPages.SelectedIndex = 0;
 }