Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 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"]);
     }
 }
Esempio n. 5
0
 public EventsLogic(IIEEWSDAL wsDal, IEventDAL evtDal)
 {
     ievtDal = evtDal ?? new EventDAL();
 }
Esempio n. 6
0
 public EventManager(IEventDAL eventDAL, IUnitOfWork uow)
 {
     _eventDAL = eventDAL;
     _uow      = uow;
 }