private void BindApplications() { WebAppGalleryHelpers helper = new WebAppGalleryHelpers(); GalleryApplicationsResult result = helper.GetGalleryApplications("ZooTemplate", PanelSecurity.PackageId); List <GalleryApplication> applications = result.Value as List <GalleryApplication>; List <GalleryApplication> filteredApplications = new List <GalleryApplication>(); List <ShortHeliconZooEngine> allowedEngines = (List <ShortHeliconZooEngine>)ViewState["AllowedEngines"]; if (null != allowedEngines) { foreach (GalleryApplication application in applications) { foreach (string keyword in application.Keywords) { bool appAlreadyAdded = false; if (keyword.StartsWith("ZooEngine", StringComparison.OrdinalIgnoreCase)) { string appEngine = keyword.Substring("ZooEngine".Length); foreach (ShortHeliconZooEngine engine in allowedEngines) { if (!engine.Enabled) { continue; //skip } if ( string.Equals(appEngine, engine.KeywordedName, StringComparison.OrdinalIgnoreCase) || engine.Name == "*" ) { filteredApplications.Add(application); appAlreadyAdded = true; break; } } if (appAlreadyAdded) { break; } } } } } else { filteredApplications.AddRange(applications); } gvApplications.DataSource = filteredApplications; gvApplications.DataBind(); }
private void BindApplications() { WebAppGalleryHelpers helper = new WebAppGalleryHelpers(); // GalleryApplicationsResult result = helper.GetGalleryApplications(ddlCategory.SelectedValue, PanelSecurity.PackageId); // gvApplications.DataSource = result.Value; gvApplications.DataBind(); }
private void BindApplications() { ViewState["IsSearchResults"] = false; WebAppGalleryHelpers helper = new WebAppGalleryHelpers(); // GalleryApplicationsResult result = helper.GetGalleryApplications(rbsCategory.SelectedValue, PanelSecurity.PackageId); // gvApplications.DataSource = result.Value; gvApplications.DataBind(); }
public List <GalleryApplication> GetGalleryApplicationsByServiceId(int serviceId) { GalleryApplicationsResult result = ES.Services.WebApplicationGallery.GetGalleryApplicationsByServiceId(serviceId); // if (result.IsSuccess) { return(result.Value); } // return(null); }
protected void SearchButton_Click(object sender, EventArgs e) { if ((bool)ViewState["IsSearchResults"] == false) { gvApplications.PageIndex = 0; } ViewState["IsSearchResults"] = true; WebAppGalleryHelpers helper = new WebAppGalleryHelpers(); GalleryApplicationsResult result = helper.GetGalleryApplicationsFiltered(searchBox.Text, PanelSecurity.PackageId); gvApplications.DataSource = result.Value; gvApplications.DataBind(); }
public GalleryApplicationsResult GetGalleryApplications(string categoryId) { try { Log.WriteStart("'{0}' GetGalleryApplications", ProviderSettings.ProviderName); GalleryApplicationsResult result = WebProvider.GetGalleryApplications(categoryId); Log.WriteEnd("'{0}' GetGalleryApplications", ProviderSettings.ProviderName); return(result); } catch (Exception ex) { Log.WriteError(String.Format("'{0}' GetGalleryApplications", ProviderSettings.ProviderName), ex); throw; } }
public GalleryApplicationsResult GetGalleryApplications(string categoryId) { GalleryApplicationsResult result = new GalleryApplicationsResult(); try { WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); // result.Value = module.GetApplications(categoryId); result.IsSuccess = true; } catch (Exception ex) { result.IsSuccess = false; result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); } // return result; }