Ejemplo n.º 1
0
        public void StartCycle(Dispatcher dispatcher)
        {
            var result = startCycle(MyTrainingOperationType.Start);
            //now refresh Training days cache
            var customerId = Customer != null ? Customer.GlobalId : (Guid?)null;
            var myCache    = TrainingDaysReposidory.GetCache(customerId, null);

            myCache.Clear();
            MyTrainingsReposidory.GetCache(customerId, null).AddOrUpdate(result);
        }
Ejemplo n.º 2
0
        public MyTrainingsViewModel(IBAWindow parentView, UserDTO user, CustomerDTO customer)
        {
            this.parentView     = parentView;
            User                = user;
            ActiveMonthDateTime = DateTime.Now;
            Customer            = customer;
            Guid?customerId = Customer != null ? Customer.GlobalId : (Guid?)null;
            Guid?userId     = User != null ? User.GlobalId : (Guid?)null;

            myTrainingsCache = MyTrainingsReposidory.GetCache(customerId, userId);
            CollectionChangedEventManager.AddListener(myTrainingsCache, this);
            updateButtons();
        }
Ejemplo n.º 3
0
        public override void AfterSave(bool isWindowClosing)
        {
            var cache = MyTrainingsReposidory.GetCache(A6WEntry.TrainingDay.CustomerId, A6WEntry.TrainingDay.ProfileId);

            cache.ClearCache();
        }