Example #1
0
        private static List <Programs> GetCMSProgramsFiltered(List <Programs> programlist)
        {
            if ((ReportsListEnum)AppSession.ReportID == ReportsListEnum.CMSCompliance)
            {
                var subscriptionTypeID = CMSService.GetSubscriptionTypeIDForCMS((WebConstants.LinkType)AppSession.LinkType);
                var cmsSites           = CMSService.GetCMSProgramsBySiteID(AppSession.SelectedSiteId, subscriptionTypeID);

                programlist = (from program in programlist
                               join cms in cmsSites on program.ProgramID equals cms.ProgramID
                               select program).ToList();
            }

            return(programlist);
        }
Example #2
0
        public static List <UserSite> GetCMSSitesFiltered(List <UserSite> sites)
        {
            if ((ReportsListEnum)AppSession.ReportID == ReportsListEnum.CMSCompliance)
            {
                var subscriptionTypeID = CMSService.GetSubscriptionTypeIDForCMS((WebConstants.LinkType)AppSession.LinkType);
                var cmsSites           = CMSService.GetCMSSitesByProgramID(AppSession.SelectedProgramId, subscriptionTypeID);

                sites = (from site in sites
                         join cms in cmsSites on site.SiteID equals cms.SiteID
                         select site).ToList();
            }

            return(sites);
        }
Example #3
0
        public bool CheckCMSForSiteID(string selectedSiteIDs)
        {
            var isCMS = false;

            if (AppSession.ReportID != 1 || AppSession.Sites.Count > 1)
            {
                var subscriptionTypeID = CMSService.GetSubscriptionTypeIDForCMS((WebConstants.LinkType)AppSession.LinkType);
                var cmsSites           = CMSService.GetCMSProgramsBySiteID(Convert.ToInt32(selectedSiteIDs.Replace(",", "")), subscriptionTypeID);

                if (cmsSites.Count > 0)
                {
                    isCMS = true;
                }
            }
            return(isCMS);
        }