private void BindData()
 {
     AdsLocations objData = new AdsLocations();
     objData.LoadAll();
     uiGridViewAdsLocations.DataSource = objData.DefaultView;
     uiGridViewAdsLocations.DataBind();
 }
Exemplo n.º 2
0
        private void LoadDDLs()
        {
            Categories objData = new Categories();
            objData.LoadAll();
            uiDropDownListCategories.DataSource = objData.DefaultView;
            uiDropDownListCategories.DataTextField = "ArName";
            uiDropDownListCategories.DataValueField = "CategoryID";
            uiDropDownListCategories.DataBind();

            AdsLocations adsLocationsData = new AdsLocations();
            adsLocationsData.LoadAll();
            uiDropDownListLocation.DataSource = adsLocationsData.DefaultView;
            uiDropDownListLocation.DataTextField = "ArTitle";
            uiDropDownListLocation.DataValueField = "AdsLocationID";
            uiDropDownListLocation.DataBind();

            uiDropDownListAdsLocations.DataSource = adsLocationsData.DefaultView;
            uiDropDownListAdsLocations.DataTextField = "ArTitle";
            uiDropDownListAdsLocations.DataValueField = "AdsLocationID";
            uiDropDownListAdsLocations.DataBind();
            uiDropDownListAdsLocations.Items.Insert(0, new ListItem("إختر مكان الإعلان", "0"));
        }