public EventListViewModel(IEventAggregator EventAggregator, IModalWindowService winService, IEventDAL eventDAL) { _eventAggregator = EventAggregator; _winService = winService; _eventDAL = eventDAL; _eventAggregator.GetEvent <AddEventClickedDate>().Subscribe(LoadEvents); EditEventClickedCommand = new DelegateCommand <int?>(EditEventClick); DeleteEventClickedCommand = new DelegateCommand <int?>(DeleteEventClick); }
public Dashboard(IRegionManager regionManager, IEventAggregator eventAggregator, IGlobalProperties globalProperties, IModalWindowService winService, IEventDAL eventDAL) { InitializeComponent(); _eventAggregator = eventAggregator; _regionManager = regionManager; _globalProperties = globalProperties; _eventDAL = eventDAL; _winService = winService; CachTableBLL CommonBll = new CachTableBLL(); CommonBll.CreateCachTable(); ProjectTemplateViewModel vm = new ProjectTemplateViewModel(_regionManager, _globalProperties); vm.LoadProjects("All"); GridAllProject.DataContext = vm; _eventAggregator.GetEvent <RefreshDashboard>().Subscribe(RefreshDashboard); }
public DashboardViewModel(IRegionManager regionManager, IGlobalProperties globalProperties, IEventAggregator eventAggregator, IEventDAL eventDAL) { try { OpenProjectClickCommand = new DelegateCommand(OpenProjectClicked); _regionManager = regionManager; _globalProperties = globalProperties; _eventAggregator = eventAggregator; _eventDAL = eventDAL; _eventAggregator.GetEvent <GlobalPropertiesUpdated>().Subscribe(OnGlobalPropertyUpdated, ThreadOption.BackgroundThread, false, a => { return(a == nameof(Notifications)); }); _eventAggregator.GetEvent <ModalWindowClosed>().Subscribe(OnAddEventClosed, ThreadOption.BackgroundThread, false, obj => { return(obj == ViewKeys.AddEvent || obj == ViewKeys.EventList); }); RefreshClickedCommand = new DelegateCommand(RefreshNotifications); ViewAllClickedCommand = new DelegateCommand(OnViewAllClicked); } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
public AddEventViewModel(IEventAggregator eventAggregator, IModalWindowService winService, IGlobalProperties globalProperties, IEventDAL eventDAL) { IsSaveEnable = "Visible"; IsUpdateEnable = false; _eventAggregator = eventAggregator; _winService = winService; _globalProperties = globalProperties; _eventDAL = eventDAL; AddEventCommand = new DelegateCommand(AddEventCommandClick); UpdateEventCommand = new DelegateCommand(UpdateEventCommandClick); AddEventCancelCommand = new DelegateCommand(AddEventCancelCommandClick); //_eventAggregator.GetEvent<EditEventEventId>().Subscribe(EditLoadEvents); if (_winService.GetParameters(ViewKeys.AddEvent)["EventId"] != null) { int EventID = Convert.ToInt16(_winService.GetParameters(ViewKeys.AddEvent)["EventId"]); EditLoadEvents(EventID); } if (_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"] != null) { SelectedEvent.StartDate = Convert.ToDateTime(_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"]); SelectedEvent.EndDate = Convert.ToDateTime(_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"]); } }
public EventsLogic(IIEEWSDAL wsDal, IEventDAL evtDal) { ievtDal = evtDal ?? new EventDAL(); }
public EventManager(IEventDAL eventDAL, IUnitOfWork uow) { _eventDAL = eventDAL; _uow = uow; }