Beispiel #1
0
        private void RefreshActivityReminder()
        {
            ActivityReminder.Expire();
            string key = _REMINDERLIST_SLOT_KEY_PREFIX + PXAccess.GetUserID();

            PXContext.SetSlot <EPActivityReminder>(key, null);
            PXDatabase.ResetSlot <EPActivityReminder>(key, typeof(CRActivity), typeof(EPView), typeof(EPAttendee), typeof(CRReminder), typeof(UserPreferences));
        }
Beispiel #2
0
            protected static ActivityStatistics GetFromSlot <TStatistics>(string key, PXGraph graph, params Type[] tables)
                where TStatistics : class, IPrefetchable <PXGraph>, new()
            {
                var slot = GetSlot <TStatistics>(key, graph, tables);

                if (slot != null && slot._day != DateTime.Today)
                {
                    PXDatabase.ResetSlot <TStatistics>(key, tables);
                    slot = GetSlot <TStatistics>(key, graph, tables);
                }
                return(slot);
            }
Beispiel #3
0
            public static EPActivityReminder GetFromSlot(string key, TasksAndEventsReminder graph)
            {
                EPActivityReminder slot = PXDatabase.GetSlot <EPActivityReminder, TasksAndEventsReminder>(key, graph, typeof(CRActivity), typeof(EPView), typeof(EPAttendee), typeof(CRReminder), typeof(UserPreferences));

                if (slot.DBChanged)
                {
                    PXContext.SetSlot <EPActivityReminder>(key, null);
                    PXDatabase.ResetSlot <EPActivityReminder>(key, typeof(CRActivity), typeof(EPView), typeof(EPAttendee), typeof(CRReminder), typeof(UserPreferences));
                    slot = PXDatabase.GetSlot <EPActivityReminder, TasksAndEventsReminder>(key, graph, typeof(CRActivity), typeof(EPView), typeof(EPAttendee), typeof(CRReminder), typeof(UserPreferences));
                }
                return(slot);
            }
Beispiel #4
0
            public static ActivityStatistics GetFromSlot(Source source)
            {
                Type[] tables = source.Tables ??
                                new Type[] { typeof(CRActivity), typeof(EPAttendee), typeof(EPView), typeof(UserPreferences) };
                string key = _ACTIVITY_SLOT_KEY_PREFIX + source.SrceenID + PXAccess.GetUserID();

                var slot = PXDatabase.GetSlot <ActivityStatistics, Source>(key, source, tables);

                if (slot != null && slot.Day != DateTime.Today)
                {
                    PXDatabase.ResetSlot <ActivityStatistics>(key, tables);
                    slot = PXDatabase.GetSlot <ActivityStatistics, Source>(key, source, tables);
                }
                return(slot);
            }
 protected override void ResetSlot(string slotName)
 {
     PXDatabase.ResetSlot <WizardDefinition>(slotName + Thread.CurrentThread.CurrentUICulture.Name, Tables);
 }