Ejemplo n.º 1
0
    private void BindPageDropDown()
    {
        try
        {
            List <PageEntity> LINQParentPages = StoreSetting.GetActivePortalPages(GetPortalID, GetUsername, "---", true, false, DBNull.Value, DBNull.Value);

            ddlMyAccountURL.Items.Clear();
            ddlMyAccountURL.DataSource     = LINQParentPages;
            ddlMyAccountURL.DataTextField  = "PageName";
            ddlMyAccountURL.DataValueField = "SEOName";
            ddlMyAccountURL.DataBind();
            ddlMyAccountURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlShoppingCartURL.Items.Clear();
            ddlShoppingCartURL.DataSource     = LINQParentPages;
            ddlShoppingCartURL.DataTextField  = "PageName";
            ddlShoppingCartURL.DataValueField = "SEOName";
            ddlShoppingCartURL.DataBind();
            ddlShoppingCartURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlWishListURL.Items.Clear();
            ddlWishListURL.DataSource     = LINQParentPages;
            ddlWishListURL.DataTextField  = "PageName";
            ddlWishListURL.DataValueField = "SEOName";
            ddlWishListURL.DataBind();
            ddlWishListURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlDetailsPageURL.Items.Clear();
            ddlDetailsPageURL.DataSource     = LINQParentPages;
            ddlDetailsPageURL.DataTextField  = "PageName";
            ddlDetailsPageURL.DataValueField = "SEOName";
            ddlDetailsPageURL.DataBind();
            ddlDetailsPageURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlItemDetailURL.Items.Clear();
            ddlItemDetailURL.DataSource     = LINQParentPages;
            ddlItemDetailURL.DataTextField  = "PageName";
            ddlItemDetailURL.DataValueField = "SEOName";
            ddlItemDetailURL.DataBind();
            ddlItemDetailURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlCategoryDetailURL.Items.Clear();
            ddlCategoryDetailURL.DataSource     = LINQParentPages;
            ddlCategoryDetailURL.DataTextField  = "PageName";
            ddlCategoryDetailURL.DataValueField = "SEOName";
            ddlCategoryDetailURL.DataBind();
            ddlCategoryDetailURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlServicesDetailURL.Items.Clear();
            ddlServicesDetailURL.DataSource     = LINQParentPages;
            ddlServicesDetailURL.DataTextField  = "PageName";
            ddlServicesDetailURL.DataValueField = "SEOName";
            ddlServicesDetailURL.DataBind();
            ddlServicesDetailURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlSingleCheckOutURL.Items.Clear();
            ddlSingleCheckOutURL.DataSource     = LINQParentPages;
            ddlSingleCheckOutURL.DataTextField  = "PageName";
            ddlSingleCheckOutURL.DataValueField = "SEOName";
            ddlSingleCheckOutURL.DataBind();
            ddlSingleCheckOutURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlMultiCheckOutURL.Items.Clear();
            ddlMultiCheckOutURL.DataSource     = LINQParentPages;
            ddlMultiCheckOutURL.DataTextField  = "PageName";
            ddlMultiCheckOutURL.DataValueField = "SEOName";
            ddlMultiCheckOutURL.DataBind();
            ddlMultiCheckOutURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlAdvanceSearchURL.Items.Clear();
            ddlAdvanceSearchURL.DataSource     = LINQParentPages;
            ddlAdvanceSearchURL.DataTextField  = "PageName";
            ddlAdvanceSearchURL.DataValueField = "SEOName";
            ddlAdvanceSearchURL.DataBind();
            ddlAdvanceSearchURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlStoreLocatorURL.Items.Clear();
            ddlStoreLocatorURL.DataSource     = LINQParentPages;
            ddlStoreLocatorURL.DataTextField  = "PageName";
            ddlStoreLocatorURL.DataValueField = "SEOName";
            ddlStoreLocatorURL.DataBind();
            ddlStoreLocatorURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlCompareItemURL.Items.Clear();
            ddlCompareItemURL.DataSource     = LINQParentPages;
            ddlCompareItemURL.DataTextField  = "PageName";
            ddlCompareItemURL.DataValueField = "SEOName";
            ddlCompareItemURL.DataBind();
            ddlCompareItemURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));


            ddlRssFeedURL.Items.Clear();
            ddlRssFeedURL.DataSource     = LINQParentPages;
            ddlRssFeedURL.DataTextField  = "PageName";
            ddlRssFeedURL.DataValueField = "SEOName";
            ddlRssFeedURL.DataBind();
            ddlRssFeedURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlAppointBookURL.Items.Clear();
            ddlAppointBookURL.DataSource     = LINQParentPages;
            ddlAppointBookURL.DataTextField  = "PageName";
            ddlAppointBookURL.DataValueField = "SEOName";
            ddlAppointBookURL.DataBind();
            ddlAppointBookURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlServiceURL.Items.Clear();
            ddlServiceURL.DataSource     = LINQParentPages;
            ddlServiceURL.DataTextField  = "PageName";
            ddlServiceURL.DataValueField = "SEOName";
            ddlServiceURL.DataBind();
            ddlServiceURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlSItemDetailURL.Items.Clear();
            ddlSItemDetailURL.DataSource     = LINQParentPages;
            ddlSItemDetailURL.DataTextField  = "PageName";
            ddlSItemDetailURL.DataValueField = "SEOName";
            ddlSItemDetailURL.DataBind();
            ddlSItemDetailURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlCatWiseItemURL.Items.Clear();
            ddlCatWiseItemURL.DataSource     = LINQParentPages;
            ddlCatWiseItemURL.DataTextField  = "PageName";
            ddlCatWiseItemURL.DataValueField = "SEOName";
            ddlCatWiseItemURL.DataBind();
            ddlCatWiseItemURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlTrackPackageUrl.Items.Clear();
            ddlTrackPackageUrl.DataSource     = LINQParentPages;
            ddlTrackPackageUrl.DataTextField  = "PageName";
            ddlTrackPackageUrl.DataValueField = "SEOName";
            ddlTrackPackageUrl.DataBind();
            ddlTrackPackageUrl.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlShippingDetailPageURL.Items.Clear();
            ddlShippingDetailPageURL.DataSource     = LINQParentPages;
            ddlShippingDetailPageURL.DataTextField  = "PageName";
            ddlShippingDetailPageURL.DataValueField = "SEOName";
            ddlShippingDetailPageURL.DataBind();
            ddlShippingDetailPageURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlItemMgntPageURL.Items.Clear();
            ddlItemMgntPageURL.DataSource     = LINQParentPages;
            ddlItemMgntPageURL.DataTextField  = "PageName";
            ddlItemMgntPageURL.DataValueField = "SEOName";
            ddlItemMgntPageURL.DataBind();
            ddlItemMgntPageURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlCatMgntPageURL.Items.Clear();
            ddlCatMgntPageURL.DataSource     = LINQParentPages;
            ddlCatMgntPageURL.DataTextField  = "PageName";
            ddlCatMgntPageURL.DataValueField = "SEOName";
            ddlCatMgntPageURL.DataBind();
            ddlCatMgntPageURL.Items.Insert(0, new ListItem("<Not Specified>", "-1"));

            ddlPromoItemsUrl.Items.Clear();
            ddlPromoItemsUrl.DataSource     = LINQParentPages;
            ddlPromoItemsUrl.DataTextField  = "PageName";
            ddlPromoItemsUrl.DataValueField = "SEOName";
            ddlPromoItemsUrl.DataBind();
            ddlPromoItemsUrl.Items.Insert(0, new ListItem("<Not Specified>", "-1"));
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }