public override void CreateViewModels() { ServiceFactory.Layout.AddAlarmGroups(new AlarmGroupsViewModel()); ServiceFactory.Layout.AddToolbarItem(new GKConnectionIndicatorViewModel()); DevicesViewModel = new DevicesViewModel(); DeviceParametersViewModel = new DeviceParametersViewModel(); ZonesViewModel = new ZonesViewModel(); GuardZonesViewModel = new GuardZonesViewModel(); SKDZonesViewModel = new SKDZonesViewModel(); DirectionsViewModel = new DirectionsViewModel(); DelaysViewModel = new DelaysViewModel(); PimsViewModel = new PimsViewModel(); PumpStationsViewModel = new PumpStationsViewModel(); MPTsViewModel = new MPTsViewModel(); DoorsViewModel = new DoorsViewModel(); AlarmsViewModel = new AlarmsViewModel(); DaySchedulesViewModel = new DaySchedulesViewModel(); SchedulesViewModel = new SchedulesViewModel(); ServiceFactory.Events.GetEvent<ShowGKAlarmsEvent>().Unsubscribe(OnShowAlarms); ServiceFactory.Events.GetEvent<ShowGKAlarmsEvent>().Subscribe(OnShowAlarms); ServiceFactory.Events.GetEvent<ShowGKDebugEvent>().Unsubscribe(OnShowGKDebug); ServiceFactory.Events.GetEvent<ShowGKDebugEvent>().Subscribe(OnShowGKDebug); SubscribeShowDelailsEvent(); }
public IActionResult DoorsInfo() { DoorsViewModel dvm = new DoorsViewModel(); var doors = _dbContext.Doors .Include(d => d.Color) .Include(d => d.DoorsCategories) .Include(d => d.MaterialsDoor) .Include(d => d.OpeningStyles) .Include(d => d.StyleTypes); #region MyRegion dvm.Doors = new List <Doors>(doors); //var door= new Doors() //{ // DoorName = "Тестові двері", // Width = 571, // Height = 2122, // Thickness = 112, // Price = 4123, // Rate = 0.42, // DoorsCategoriesId = 3, // OpeningStylesId = 2, // StyleTypesId = 3, // ColorId = 6, //}; //var order =new Orders() //{ // OrderDate = Convert.ToDateTime("2020-05-14"), // PaymentDeadline = Convert.ToDateTime("2020-09-01"), // PaymentStatus = 0, // OrderTotalPrice = 11709, // CustomersId = 6, // EmployeeId = 6 //}; //var orderDetail=new OrderDetails() //{ // Door = door, // Order = order, // DoorQuantity = 2 //}; //_dbContext.Doors.Add(door); //_dbContext.Orders.Add(order); //_dbContext.OrderDetails.Add(orderDetail); //_dbContext.SaveChanges(); #endregion return(View(dvm)); }
public override void CreateViewModels() { ServiceFactory.Events.GetEvent<SelectGKZoneEvent>().Subscribe(OnSelectGKZone); ServiceFactory.Events.GetEvent<SelectGKZonesEvent>().Subscribe(OnSelectGKZones); ServiceFactory.Events.GetEvent<SelectGKGuardZoneEvent>().Subscribe(OnSelectGKGuardZone); ServiceFactory.Events.GetEvent<SelectGKGuardZonesEvent>().Subscribe(OnSelectGKGuardZones); ServiceFactory.Events.GetEvent<SelectGKDelayEvent>().Subscribe(OnSelectGKDelay); ServiceFactory.Events.GetEvent<SelectGKDelaysEvent>().Subscribe(OnSelectGKDelays); ServiceFactory.Events.GetEvent<SelectGKDirectionEvent>().Subscribe(OnSelectGKDirection); ServiceFactory.Events.GetEvent<SelectGKDirectionsEvent>().Subscribe(OnSelectGKDirections); ServiceFactory.Events.GetEvent<SelectGKMPTEvent>().Subscribe(OnSelectGKMPT); ServiceFactory.Events.GetEvent<SelectGKMPTsEvent>().Subscribe(OnSelectGKMPTs); ServiceFactory.Events.GetEvent<SelectGKDoorEvent>().Subscribe(OnSelectGKDoor); ServiceFactory.Events.GetEvent<SelectGKDoorsEvent>().Subscribe(OnSelectGKDoors); ServiceFactory.Events.GetEvent<SelectGKDeviceEvent>().Subscribe(OnSelectGKDevice); ServiceFactory.Events.GetEvent<SelectGKDevicesEvent>().Subscribe(OnSelectGKDevices); ServiceFactory.Events.GetEvent<SelectGKPumpStationEvent>().Subscribe(OnSelectGKPumpStation); ServiceFactory.Events.GetEvent<SelectGKPumpStationsEvent>().Subscribe(OnSelectGKPumpStations); DevicesViewModel = new DevicesViewModel(); ParameterTemplatesViewModel = new ParameterTemplatesViewModel(); ZonesViewModel = new ZonesViewModel(); DirectionsViewModel = new DirectionsViewModel(); DelaysViewModel = new DelaysViewModel(); PumpStationsViewModel = new PumpStationsViewModel(); MPTsViewModel = new MPTsViewModel(); CodesViewModel = new CodesViewModel(); GuardZonesViewModel = new GuardZonesViewModel(); DoorsViewModel = new DoorsViewModel(); SKDZonesViewModel = new SKDZonesViewModel(); DeviceLidraryViewModel = new LibraryViewModel(); OPCViewModel = new OPCsViewModel(); DescriptorsViewModel = new DescriptorsViewModel(); DiagnosticsViewModel = new DiagnosticsViewModel(); _planExtension = new GKPlanExtension(); }
public DoorsMenuViewModel(DoorsViewModel context) { Context = context; }