/// <summary> /// Constructor. /// </summary> /// <param name="services">Data service for data retrieving</param> /// <param name="controller">Interaction controller for showing popup</param> /// <param name="dialogService">Error message dialog controller</param> /// <param name="unityContainer"></param> /// <param name="eventManager"></param> /// <param name="navigation"></param> /// <param name="configurationService"></param> /// <param name="regionManager"></param> public BookingIncidentInfoViewModel(IDataServices services, IInteractionRequestController controller, IDialogService dialogService, IUnityContainer unityContainer, IEventManager eventManager, IKarveNavigator navigation, IConfigurationService configurationService, IRegionManager regionManager) : base(services, controller, dialogService, eventManager, regionManager, configurationService) { AssistCommand = new DelegateCommand <object>(OnAssistCommand); ItemChangedCommand = new DelegateCommand <object>(OnChangedField); SubSystem = DataSubSystem.BookingSubsystem; ViewModelUri = new Uri("karve://booking/incident/show/viewmodel?id=" + Guid.ToString()); _unityContainer = unityContainer; _navigator = navigation; _userSettings = configurationService.UserSettings; _deleteCommand = new DelegateCommand <object>(DeleteViewCommand); _saveCommand = new DelegateCommand <object>(SaveViewCommand); _newCommand = new DelegateCommand <object>(NewViewCommand); _dataIncidentService = services.GetBookingIncidentDataService(); _assistDataService = services.GetAssistDataServices(); _unityContainer = unityContainer; CompositeCommandOnly = true; VehicleColumns = "Code,Brand,Model,Matricula,VehicleGroup,Situation,Office,Places,CubeMeters,Activity,Owner"; ClientsConductorColumns = "Code,Name,Nif,Phone,Movil,Email,Card,ReplacementCar,Zip,City,CreditCardType,NumberCreditCard, PaymentForm,AccountableAccount,Sector,Zona,Origin,Office,Falta,BirthDate,DrivingLicence"; AssistMapper = _assistDataService.Mapper; EventManager.RegisterObserverSubsystem(BookingModule.GroupBookingIncident, this); EventManager.RegisterObserverSubsystem(BookingModule.BookingSubSystem, this); }
public BookingIncidentControlViewModel(IDataServices services, IConfigurationService configurationService, IInteractionRequestController requestController, IDialogService dialogService, IRegionManager manager, IEventManager eventManager) : base(configurationService, services, requestController, dialogService, eventManager) { _incidentService = services.GetBookingIncidentDataService(); _regionManager = manager; ItemName = "Incidencias"; DefaultPageSize = 50; ViewModelUri = new Uri("karve://booking/incident/viewmodel?id=" + UniqueId); InitViewModel(); }