/// <summary>
    /// Gets applications matching the given <paramref name="guidCollection"/> and filters them according to the current user permission.
    /// </summary>
    /// <param name="guidCollection">Collection of application Guids to be filtered</param>
    /// <returns>Collection of filtered applications</returns>
    private List <UIElementInfo> GetFilteredApplications(ICollection <Guid> guidCollection)
    {
        var applicationsWhere = new WhereCondition().WhereIn("ElementGUID", guidCollection);
        var applications      = ApplicationUIHelper.FilterApplications(ApplicationUIHelper.LoadApplications(applicationsWhere), CurrentUser, false);

        return(applications.Tables[0].Rows.Cast <DataRow>().Select(row => new UIElementInfo(row)).ToList());
    }
コード例 #2
0
    /// <summary>
    /// Setup application list.
    /// </summary>
    private void SetupAppList()
    {
        DataSet ds = ApplicationUIHelper.LoadApplications();
        DataSet filteredDataSet = ApplicationUIHelper.FilterApplications(ds, CurrentUser, true);

        if (filteredDataSet != null && !DataHelper.DataSourceIsEmpty(filteredDataSet))
        {
            // Create grouped data source
            appListUniview.DataSource = new GroupedDataSource(filteredDataSet, "ElementParentID", "ElementLevel");
            appListUniview.ReloadData(true);
        }

        if (SiteContext.CurrentSite != null)
        {
            SetupLiveSiteLink();
        }
    }