protected void Page_Load(object sender, EventArgs e)
        {
            ClientScriptManager cs = Page.ClientScript;

            cs.RegisterClientScriptInclude("jquery", ResolveUrl("~/JavaScript/jquery-1.4.4.min.js"));

            // Maintains appearance settings corresponding to user's display preferences
            gvApplications.PageSize = UsersHelper.GetDisplayItemsPerPage();

            try
            {
                GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);
                //
                if (!result.IsSuccess)
                {
                    rbsCategory.Visible = false;
                    messageBox.ShowMessage(result, "WAG_NOT_AVAILABLE", "ModuleWAG");
                    return;
                }

                if (!IsPostBack)
                {
                    //
                    SetLanguage();
                    BindLanguages();
                    BindCategories();
                    BindApplications();
                    ViewState["IsSearchResults"] = false;
                }
            }
            catch (Exception ex)
            {
                ShowErrorMessage("GET_WEB_GALLERY_CATEGORIES", ex);
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Maintains appearance settings corresponding to user's display preferences
            gvApplications.PageSize = UsersHelper.GetDisplayItemsPerPage();

            try
            {
                GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);
                //
                if (!result.IsSuccess)
                {
                    ddlCategory.Visible = false;
                    messageBox.ShowMessage(result, "WAG_NOT_AVAILABLE", "ModuleWAG");
                    return;
                }

                if (!IsPostBack)
                {
                    BindCategories();
                    BindApplications();
                }
            }
            catch (Exception ex)
            {
                ShowErrorMessage("GET_WEB_GALLERY_CATEGORIES", ex);
            }
        }
Пример #3
0
        private void BindCategories()
        {
            GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);

            //
            ddlCategory.DataSource     = result.Value;
            ddlCategory.DataTextField  = "Name";
            ddlCategory.DataValueField = "Id";
            ddlCategory.DataBind();

            // add empty
            ddlCategory.Items.Insert(0, new ListItem(GetLocalizedString("SelectCategory.Text"), ""));
        }
Пример #4
0
 public GalleryCategoriesResult GetGalleryCategories()
 {
     try
     {
         Log.WriteStart("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName);
         GalleryCategoriesResult result = WebProvider.GetGalleryCategories();
         Log.WriteEnd("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName);
         return(result);
     }
     catch (Exception ex)
     {
         Log.WriteError(String.Format("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName), ex);
         throw;
     }
 }
        private void BindCategories()
        {
            GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);

            //
            rbsCategory.DataSource     = result.Value;
            rbsCategory.DataTextField  = "Name";
            rbsCategory.DataValueField = "Id";
            rbsCategory.DataBind();

            // add empty
            ListItem listItem = new ListItem("All", "");

            listItem.Attributes["class"] = "selected";
            rbsCategory.Items.Insert(0, listItem);
        }
Пример #6
0
		public GalleryCategoriesResult GetGalleryCategories()
		{
			GalleryCategoriesResult result = new GalleryCategoriesResult();
			
			try
			{
				WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
				//
				result.Value = module.GetCategories();
				result.IsSuccess = true;
			}
			catch (Exception ex)
			{
				result.IsSuccess = false;
				result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
			}
			//
			return result;
		}