예제 #1
0
        public IActionResult Advertising(long deviceId)
        {
            DeviceAdvertisingsView advertisementView = new DeviceAdvertisingsView();

            advertisementView.Device = _deviceService.GetDevices().SingleOrDefault(d => d.Id == deviceId);

            IEnumerable <Advertisement> advertisings = _advertisingService.GetAdvertisements(deviceId);

            advertisementView.Advertisements = advertisings;

            return(View(advertisementView));
        }
예제 #2
0
 public override void OnActionExecuted(ActionExecutedContext context)
 {
     base.OnActionExecuted(context);
     ViewBag.DeviceAmount = _deviceService.GetDevices().Count();
     ViewBag.UserAmount   = _userService.GetUsers().Count();
     ViewBag.FileAmount   = _advertisingService.GetAdvertisements(0).Count();
 }