Exemple #1
0
        /// <summary>
        /// Update weekly stats
        /// </summary>
        public static void UpdateStatsWeek(IServiceLayer DBServiceLayer, bool updateInOuts = false)
        {
            WeeklyStats stats = DBServiceLayer.GetCurrentWeekStats();

            stats.WeekNumber     = DBServiceLayer.GetCurrentWeekNumber();
            stats.ScannedIn      = stats.ScannedIn + ModuleScanning.getScannedIn();
            stats.ScannedOut     = stats.ScannedOut + ModuleScanning.getScannedOut();
            stats.TotalListeners = DBServiceLayer.GetCurrentListenerCount();
            stats.PausedCount    = DBServiceLayer.GetListenersByStatus(ListenerStates.PAUSED).Count;

            // Just update it if it already exists
            if (DBServiceLayer.WeeklyStatExistsForWeek(stats.WeekNumber))
            {
                DBServiceLayer.UpdateWeeklyStats(stats);
            }
            else
            {
                DBServiceLayer.SaveWeekStats(stats);
            }

            // Update the in/outs if required
            if (updateInOuts)
            {
                // Update in/out stats.
                DBServiceLayer.UpdateListenerInOuts();
            }
        }
Exemple #2
0
 public static IServiceLayer Instance(IServiceLayer serviceLayer)
 {
     serviceLayer.Get <IBasketService>().SetRootService(serviceLayer);
     serviceLayer.Get <IProductService>().SetRootService(serviceLayer);
     serviceLayer.Get <IOrderService>().SetRootService(serviceLayer);
     serviceLayer.Get <IContractService>().SetRootService(serviceLayer);
     return(serviceLayer);
 }
Exemple #3
0
 public EmployeeController(IServiceLayer service)
 {
     empService = service;
 }
 public ProductController(IServiceLayer serviceLayer)
 {
     _serviceLayer = ServiceLayer.Instance(serviceLayer);
 }
Exemple #5
0
 public Functions(IServiceLayer serviceLayer)
 {
     _serviceLayer = serviceLayer;
 }
 public HomeController(IServiceLayer _service)
 {
     NegaheNoService = _service;
 }
Exemple #7
0
 public GalleryController(IServiceLayer _srevice)
 {
     NegahenoService = _srevice;
 }
 public ArtGalleryController(IServiceLayer _service)
 {
     NegahenoService = _service;
 }
Exemple #9
0
 public ProfileController(IServiceLayer _service)
 {
     NegaheNoService = _service;
 }
Exemple #10
0
 public void SetRootService(IServiceLayer serviceLayer)
 {
     RootServiceLayer = serviceLayer;
 }
Exemple #11
0
 public dsOverlayLayer(IServiceLayer layer)
 {
     parent = layer;
 }