private void BindOtherUpdatesList()
        {
            MemoryCacheItem.dossiers = EUIssueTrackerHelper.GetDossiers();
            string[] urlParams     = this.GetUrlParameters();
            var      dossierUpdate = EUIssueTrackerHelper.GetDossierByUrlParams(urlParams);

            var category = dossierUpdate.Attributes.policyCategoryName.Value;

            //exclude current dossier from list
            MemoryCacheItem.dossiers.Remove(dossierUpdate);

            //filters dossiers by category and exclude current dossier from list
            MemoryCacheItem.dossiers = MemoryCacheItem.dossiers.Where(a => a.Attributes.policyCategoryName.Value == category)
                                       .ToList();

            //filters dossiers by status
            MemoryCacheItem.dossiers = MemoryCacheItem.dossiers.RestrictDossiersByStatus();

            //gets dossiers count
            if (MemoryCacheItem.dossiers.Count > 0)
            {
                otherUpdatesCount = MemoryCacheItem.dossiers.Count;
            }

            this.dossiersList.DataSource     = MemoryCacheItem.dossiers;
            this.dossiersList.ItemCreated   += dossiersList_ItemCreated;
            this.dossiersList.ItemDataBound += dossiersList_ItemDataBound;
            this.dossiersList.DataBind();
        }
        private void BindDossierList()
        {
            MemoryCacheItem.dossiers = EUIssueTrackerHelper.GetDossiers();

            //initially the dossiers grid must display all dossiers that were modified in the last X days
            var initialDossiers = MemoryCacheItem.dossiers.GetLatestUpdatedDossiersWithinDays(this.DaysToDisplayUpdatesWithin);

            this.dossiersList.DataSource     = initialDossiers.RestrictDossiersByStatus();
            this.dossiersList.ItemCreated   += dossiersList_ItemCreated;
            this.dossiersList.ItemDataBound += dossiersList_ItemDataBound;
            this.dossiersList.DataBind();
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string[] urlParams = this.GetUrlParameters();
            if (urlParams != null && urlParams.Count() > 0)
            {
                var dossierID = urlParams[0];
                var dossiers  = EUIssueTrackerHelper.GetDossiers().RestrictDossiersByStatus();
                dossierUpdate = dossiers.Where(d => d.Attributes.dossierId.Value == dossierID).FirstOrDefault();

                if (dossierUpdate != null)
                {
                    RouteHelper.SetUrlParametersResolved();
                    BindDossierDetail(dossierUpdate);
                    ResolvePageMetaTags(dossierUpdate);
                }
            }
        }
        private static void SystemManager_ApplicationStart(object sender, EventArgs e)
        {
            Res.RegisterResource <ShunghamResources>();

            RegisterSectionInBackend(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName);
            RegisterSectionInBackend(Installer.pageControlsToolboxName, Installer.ShunghamFormsSectionName);
            RegisterSectionInBackend(Installer.pageControlsToolboxName, Installer.EUCalendarControlsSectionName);
            RegisterSectionInBackend(Installer.pageControlsToolboxName, Installer.EUIssueTrackerControlsSectionName);
            RegisterSectionInBackend(Installer.pageLayoutsToolboxName, Installer.ShunghamLayoutsName);
            RegisterSectionInBackend(Installer.pageLayoutsToolboxName, Installer.ShunghamEUSectionLayoutsName);

            //Register widgets in Shungham Controls section
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/AboutUsSectionWidget/AboutUsSectionWidget.ascx", "About Us Section Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/BannerWidget/BannerWidget.ascx", "Banner Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/ButtonWidget/ButtonWidget.ascx", "Button Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/CompaniesLogosRotatorWidget/CompaniesLogosRotatorWidget.ascx", "Companies Logos Rotator Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/FeaturesWidget/FeaturesWidget.ascx", "Features Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/FooterWidget/FooterWidget.ascx", "Footer Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/HeaderWidget/HeaderWidget.ascx", "Header Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/InfoWidget/InfoWidget.ascx", "Info Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/JobOpeningsWidget/JobOpeningsWidget.ascx", "Job Openings Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/OurProductsWidget/OurProductsWidget.ascx", "Our Products Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/OurTeamWidget/OurTeamWidget.ascx", "Our Team Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/TestimonialsRotatorWidget/TestimonialsRotatorWidget.ascx", "Testimonials Rotator Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamControlsSectionName,
                                     "~/CustomWidgets/WhyJoinWidget/WhyJoinWidget.ascx", "Why Join Widget");

            //Register widgets in Shungham Forms section
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamFormsSectionName,
                                     "~/CustomWidgets/ContactUsWidget/ContactUsWidget.ascx", "Contact Us Form");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamFormsSectionName,
                                     "~/CustomWidgets/FreeTrialWidget/FreeTrialWidget.ascx", "Free Trial Form");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.ShunghamFormsSectionName,
                                     "~/CustomWidgets/JobApplicationWidget/JobApplicationWidget.ascx", "Job Application Form");

            //Register EUCalendar widgets
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.EUCalendarControlsSectionName,
                                     typeof(EUCalendarWidget).AssemblyQualifiedName, "EUCalendar Widget");

            //Register EUIssueTracker widgets
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.EUIssueTrackerControlsSectionName,
                                     typeof(CustomBreadcrumb).AssemblyQualifiedName, "Custom Breadcrumb Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.EUIssueTrackerControlsSectionName,
                                     "~/CustomWidgets/EUIssueTracker/EUDossierDetailWidget/EUDossierDetailWidget.ascx", "Dossier Detail Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.EUIssueTrackerControlsSectionName,
                                     "~/CustomWidgets/EUIssueTracker/EUDossierGridWidget/EUDossierGridWidget.ascx", "Dossier Grid Widget");
            RegisterControlInToolbox(Installer.pageControlsToolboxName, Installer.EUIssueTrackerControlsSectionName,
                                     "~/CustomWidgets/EUIssueTracker/NavigationWidget/NavigationWidget.ascx", "Navigation Widget");

            //Register Layout controls
            RegisterControlInToolbox(Installer.pageLayoutsToolboxName, Installer.ShunghamLayoutsName,
                                     Installer.layoutControlTypeName, "InfoWidget_ThreeColumns", "~/CustomLayouts/InfoWidget_ThreeColumns.ascx");
            RegisterControlInToolbox(Installer.pageLayoutsToolboxName, Installer.ShunghamLayoutsName,
                                     Installer.layoutControlTypeName, "InfoWidget_TwoColumns", "~/CustomLayouts/InfoWidget_TwoColumns.ascx");
            RegisterControlInToolbox(Installer.pageLayoutsToolboxName, Installer.ShunghamLayoutsName,
                                     Installer.layoutControlTypeName, "OneColumnGreyBGR", "~/CustomLayouts/OneColumnGreyBGR.ascx");

            //Register EUSection layout controls
            RegisterControlInToolbox(Installer.pageLayoutsToolboxName, Installer.ShunghamEUSectionLayoutsName,
                                     Installer.layoutControlTypeName, "OneColumnEUContent", "~/CustomLayouts/EUContent_OneColumn.ascx");

            //retrieve dossier updates from ms dynamics
            MemoryCacheItem.dossiers = new List <EUDossierModel>();
            MemoryCacheItem.dossiers = EUIssueTrackerHelper.GetDossiers();

            //proactive caching - retrieve events from ms dynamics
            MemoryCacheItem.events = new List <EventModel>();
            MemoryCacheItem.events = EventsControlsHelper.GetEventsList();
        }