/// <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(); } }
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); }
public EmployeeController(IServiceLayer service) { empService = service; }
public ProductController(IServiceLayer serviceLayer) { _serviceLayer = ServiceLayer.Instance(serviceLayer); }
public Functions(IServiceLayer serviceLayer) { _serviceLayer = serviceLayer; }
public HomeController(IServiceLayer _service) { NegaheNoService = _service; }
public GalleryController(IServiceLayer _srevice) { NegahenoService = _srevice; }
public ArtGalleryController(IServiceLayer _service) { NegahenoService = _service; }
public ProfileController(IServiceLayer _service) { NegaheNoService = _service; }
public void SetRootService(IServiceLayer serviceLayer) { RootServiceLayer = serviceLayer; }
public dsOverlayLayer(IServiceLayer layer) { parent = layer; }