public WorkspaceViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _workspaceDataUnit = dataUnitLocator.ResolveDataUnit<IWorkspaceDataUnit>(); _crmDataUnit = dataUnitLocator.ResolveDataUnit<ICrmDataUnit>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); var time = (int?)ApplicationSettings.Read("LogoutTime"); _logoutTime = (time.HasValue && time.Value > 0) ? time.Value : 30; // 30 minutes - default logout time EventManager.RegisterClassHandler(typeof(Window), UIElement.KeyDownEvent, new RoutedEventHandler(Window_KeyDown)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseDownEvent, new RoutedEventHandler(Window_MouseDown)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseMoveEvent, new RoutedEventHandler(Window_MouseMove)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseWheelEvent, new RoutedEventHandler(Window_MouseWheel)); _timer = new Timer(LogoutByInactivity, null, 1000 * 60 * _logoutTime, Timeout.Infinite); _updateTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(30) }; _updateTimer.Tick += UpdateTimer_Tick; _updateTimer.Start(); _updateTimerEvents = new DispatcherTimer { Interval = TimeSpan.FromSeconds(30) }; _updateTimerEvents.Tick += _updateTimerEvents_Tick; _updateTimerEvents.Start(); }
public UpdatesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsModuleDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); ShowHistoryCommand = new RelayCommand <EventUpdateModel>(ShowHistoryCommandExecuted); }
public WorkspaceViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _workspaceDataUnit = dataUnitLocator.ResolveDataUnit <IWorkspaceDataUnit>(); _crmDataUnit = dataUnitLocator.ResolveDataUnit <ICrmDataUnit>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); var time = (int?)ApplicationSettings.Read("LogoutTime"); _logoutTime = (time.HasValue && time.Value > 0) ? time.Value : 30; // 30 minutes - default logout time EventManager.RegisterClassHandler(typeof(Window), UIElement.KeyDownEvent, new RoutedEventHandler(Window_KeyDown)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseDownEvent, new RoutedEventHandler(Window_MouseDown)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseMoveEvent, new RoutedEventHandler(Window_MouseMove)); EventManager.RegisterClassHandler(typeof(Window), UIElement.MouseWheelEvent, new RoutedEventHandler(Window_MouseWheel)); _timer = new Timer(LogoutByInactivity, null, 1000 * 60 * _logoutTime, Timeout.Infinite); _updateTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(30) }; _updateTimer.Tick += UpdateTimer_Tick; _updateTimer.Start(); _updateTimerEvents = new DispatcherTimer { Interval = TimeSpan.FromSeconds(30) }; _updateTimerEvents.Tick += _updateTimerEvents_Tick; _updateTimerEvents.Start(); }
public AddEventReminderViewModel(IEnumerable <EventModel> events, EventReminderModel eventReminderModel) { var Today = DateTime.Now; Events = events.Where(x => x.Date.Date > Today.Date).OrderBy(x => x.Date).ThenBy(x => x.Name).ToList(); var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); OpenEventCommand = new RelayCommand(OpenEventCommandExecute, OpenEventCommandCanExecute); if (eventReminderModel != null) { ProcessEventReminder(eventReminderModel); SelectedEvent = Events.FirstOrDefault(x => x.Event == eventReminderModel.EventReminder.Event); _originalEvent = SelectedEvent.Clone(); } else { EventReminder = GetEventReminderWithoutEvent(); EventReminder.PropertyChanged += EventReminderOnPropertyChanged; } }
public FromTemplateViewModel(EventModel eventModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); OKCommand = new RelayCommand(OKCommandExecuted, OKCommandCanExecute); }
public UpdatedRemindersViewModel(ObservableCollection<EventReminderModel> eventRemindersToBeUpdated) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); EventRemindersToBeUpdated = eventRemindersToBeUpdated; UpdateRemindersCommand = new RelayCommand(UpdateRemindersCommandExecuted); }
public RemindersViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); DeleteReminderCommand = new RelayCommand <EventReminderModel>(DeleteReminderCommandExecuted); EditReminderCommand = new RelayCommand <EventReminderModel>(EditReminderCommandExecuted); }
public EventCorrespondenceViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SendEmailCommand = new RelayCommand(SendEmailCommandExecuted); ShowCorrespondenceCommand = new RelayCommand<CorrespondenceModel>(ShowCorrespondenceCommandExecuted); }
public UpdatedRemindersViewModel(ObservableCollection <EventReminderModel> eventRemindersToBeUpdated) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); EventRemindersToBeUpdated = eventRemindersToBeUpdated; UpdateRemindersCommand = new RelayCommand(UpdateRemindersCommandExecuted); }
public FromTemplateViewModel(EventModel eventModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); OKCommand = new RelayCommand(OKCommandExecuted, OKCommandCanExecute); }
public EventCorrespondenceViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SendEmailCommand = new RelayCommand(SendEmailCommandExecuted); ShowCorrespondenceCommand = new RelayCommand <CorrespondenceModel>(ShowCorrespondenceCommandExecuted); }
public EventPaymentsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); AddPaymentCommand = new RelayCommand(AddPaymentCommandExecuted); DeletePaymentCommand = new RelayCommand<EventPaymentModel>(DeletePaymentCommandExecuted); EditPaymentCommand = new RelayCommand<EventPaymentModel>(EditPaymentCommandExecuted); }
public EventPaymentsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddPaymentCommand = new RelayCommand(AddPaymentCommandExecuted); DeletePaymentCommand = new RelayCommand <EventPaymentModel>(DeletePaymentCommandExecuted); EditPaymentCommand = new RelayCommand <EventPaymentModel>(EditPaymentCommandExecuted); }
public EventAlternativeContactsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); AddAlternativeContactCommand = new RelayCommand(AddAlternativeContactCommandExecuted); FindContactCommand = new RelayCommand(FindContactCommandExecuted); DeleteAlternativeContactCommand = new RelayCommand<EventContact>(DeleteAlternativeContactCommandExecuted); EditAlternativeContactCommand = new RelayCommand<EventContact>(EditAlternativeContactCommandExecuted); }
public EventsBookedViewModel(ObservableCollection <EventModel> model) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); EditEventCommand = new RelayCommand <EventModel>(EditEventCommandExecuted, EditEventCommandCanExecute); DetailsItemCommand = new RelayCommand <EventModel>(DetailsItemCommandExecuted); Events = model; }
public AddCalendarNoteViewModel(CalendarNoteModel note) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SaveCommand = new RelayCommand(SaveCommandExecuted, SaveCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessNote(note); }
public EventDetailsViewModel(EventModel model) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); _contactsDataUnit = dataUnitLocator.ResolveDataUnit<IContactsDataUnit>(); EditEventCommand = new RelayCommand<EventModel>(EditEventCommandExecuted, EditEventCommandCanExecute); Event = model; }
public EventNotesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); AddNoteCommand = new RelayCommand(AddNoteCommandExecuted); DeleteNoteCommand = new RelayCommand<EventNoteModel>(DeleteNoteCommandExecuted); EditNoteCommand = new RelayCommand<EventNoteModel>(EditNoteCommandExecuted); OpenEnquiryCommand = new RelayCommand(OpenEnquiryCommandExecute); }
public EventDetailsViewModel(EventModel model) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); _contactsDataUnit = dataUnitLocator.ResolveDataUnit <IContactsDataUnit>(); EditEventCommand = new RelayCommand <EventModel>(EditEventCommandExecuted, EditEventCommandCanExecute); Event = model; }
public AddCalendarNoteViewModel(CalendarNoteModel note) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SaveCommand = new RelayCommand(SaveCommandExecuted, SaveCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessNote(note); }
public AddEventChargeViewModel(EventModel eventModel, EventChargeModel charge) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); ProcessCharge(charge); }
public EventAlternativeContactsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddAlternativeContactCommand = new RelayCommand(AddAlternativeContactCommandExecuted); FindContactCommand = new RelayCommand(FindContactCommandExecuted); DeleteAlternativeContactCommand = new RelayCommand <EventContact>(DeleteAlternativeContactCommandExecuted); EditAlternativeContactCommand = new RelayCommand <EventContact>(EditAlternativeContactCommandExecuted); }
public EventNotesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddNoteCommand = new RelayCommand(AddNoteCommandExecuted); DeleteNoteCommand = new RelayCommand <EventNoteModel>(DeleteNoteCommandExecuted); EditNoteCommand = new RelayCommand <EventNoteModel>(EditNoteCommandExecuted); OpenEnquiryCommand = new RelayCommand(OpenEnquiryCommandExecute); }
//public RelayCommand<ReportModel> DeleteDocumentCommand { get; private set; } #endregion #region Constructor public EventReportsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); ShowFunctionSheetCommand = new RelayCommand(ShowFunctionSheetCommandExecuted, () => true); ShowDocumentCommand = new RelayCommand<ReportModel>(ShowDocumentCommandExecuted, report => true); ShowQuoteCommand = new RelayCommand(ShowQuoteCommandExecuted, () => true); ShowConfirmationCommand = new RelayCommand(ShowConfirmationCommandExecuted, () => true); AttachDocumentCommand = new RelayCommand(AttachDocumentCommandExecuted); //DeleteDocumentCommand = new RelayCommand<ReportModel>(DeleteDocumentCommandExecuted); }
public AddEventChargeViewModel(EventModel eventModel, EventChargeModel charge) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); ProcessCharge(charge); }
public EventChargesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); AddChargeCommand = new RelayCommand(AddChargeCommandExecuted); AddInvoiceCommand = new RelayCommand(AddInvoiceCommandExecuted, AddInvoiceCommandCanExecute); EditChargeCommand = new RelayCommand<EventChargeModel>(EditChargeCommandExecuted); CommitChargeCommand = new RelayCommand<EventChargeModel>(CommitChargeCommandExecuted); UndoCommitChargeCommand = new RelayCommand<EventChargeModel>(UndoCommitChargeCommandExecuted, UndoCommitChargeCommandCanExecute); }
} // Used in AlternativeContactts #endregion #region Constructor public AddAlternativeContactViewModel(EventModel eventModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); AddContact(); }
public AddNoteViewModel(EventModel eventModel, EventNoteModel noteModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessNote(noteModel); }
public ProductsViewModel(ProductType productType) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _adminDataUnit = dataUnitLocator.ResolveDataUnit <IAdminDataUnit>(); _reportsDataUnit = dataUnitLocator.ResolveDataUnit <IReportsDataUnit>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SelectedProductType = productType; DeleteProductCommand = new RelayCommand <ProductModel>(DeleteProductCommandExecuted); EditProductCommand = new RelayCommand <ProductModel>(EditProductCommandExecuted); }
public AddNoteViewModel(EventModel eventModel, EventNoteModel noteModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessNote(noteModel); }
public AddInvoiceViewModel(EventModel eventModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); GetInvoiceNumberCommand = new RelayCommand(GetInvoiceNumberCommandExecuted, GetInvoiceNumberCommandCanExecute); UndoGetInvoiceNumberCommand = new RelayCommand(UndoGetInvoiceNumberCommandExecuted, UndoGetInvoiceNumberCommandCanExecute); ShowInvoiceReportCommand = new RelayCommand(ShowInvoiceReportCommandExecuted, ShowInvoiceReportCommandCanExecute); Invoice = GetInvoice(); }
public EventChargesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddChargeCommand = new RelayCommand(AddChargeCommandExecuted); AddInvoiceCommand = new RelayCommand(AddInvoiceCommandExecuted, AddInvoiceCommandCanExecute); EditChargeCommand = new RelayCommand <EventChargeModel>(EditChargeCommandExecuted); CommitChargeCommand = new RelayCommand <EventChargeModel>(CommitChargeCommandExecuted); UndoCommitChargeCommand = new RelayCommand <EventChargeModel>(UndoCommitChargeCommandExecuted, UndoCommitChargeCommandCanExecute); }
//public RelayCommand<ReportModel> DeleteDocumentCommand { get; private set; } #endregion #region Constructor public EventReportsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); ShowFunctionSheetCommand = new RelayCommand(ShowFunctionSheetCommandExecuted, () => true); ShowDocumentCommand = new RelayCommand <ReportModel>(ShowDocumentCommandExecuted, report => true); ShowQuoteCommand = new RelayCommand(ShowQuoteCommandExecuted, () => true); ShowConfirmationCommand = new RelayCommand(ShowConfirmationCommandExecuted, () => true); AttachDocumentCommand = new RelayCommand(AttachDocumentCommandExecuted); //DeleteDocumentCommand = new RelayCommand<ReportModel>(DeleteDocumentCommandExecuted); }
public SendEventMailViewModel(EventModel eventModel, CorrespondenceModel mail) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessMail(mail); }
public ReminderPopUpViewModel(EventReminderModel eventReminderModel) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); EventReminder = eventReminderModel; SnoozeCommand = new RelayCommand(SnoozeCommandExecute); OpenEventCommand = new RelayCommand(OpenEventCommandExecuted, OpenEventCommandCanExecute); CompleteEventReminderCommand = new RelayCommand(CompleteEventReminderCommandExecuted); DeleteEventReminderCommand = new RelayCommand(DeleteEventReminderCommandExecute); }
public AddInvoiceViewModel(EventModel eventModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); GetInvoiceNumberCommand = new RelayCommand(GetInvoiceNumberCommandExecuted, GetInvoiceNumberCommandCanExecute); UndoGetInvoiceNumberCommand = new RelayCommand(UndoGetInvoiceNumberCommandExecuted, UndoGetInvoiceNumberCommandCanExecute); ShowInvoiceReportCommand = new RelayCommand(ShowInvoiceReportCommandExecuted, ShowInvoiceReportCommandCanExecute); Invoice = GetInvoice(); }
public EPOSViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _adminDataUnit = dataUnitLocator.ResolveDataUnit <IAdminDataUnit>(); _reportsDataUnit = dataUnitLocator.ResolveDataUnit <IReportsDataUnit>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddProductCommand = new RelayCommand(AddProductCommandExecuted); AddTillCommand = new RelayCommand(AddTillCommandExecuted); AddProductGroupCommand = new RelayCommand(AddProductGroupCommandExecuted); AddProductDepartmentCommand = new RelayCommand(AddProductDepartmentCommandExecuted); DeleteEPOSCommand = new RelayCommand(DeleteEPOSCommandExecuted, DeleteEPOSCommandCanExecute); }
public EventItemsAlreadyBookedViewModel(EventModel model, List <EventCateringModel> alreadyBookedCaterings, List <EventRoomModel> alreadyBookedRooms, List <EventGolfModel> alreadyBookedGolfs, ObservableCollection <EventItemModel> eventItemsAlreadyBooked) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); DeleteItemCommand = new RelayCommand <EventItemModel>(DeleteItemCommandExecuted); EditItemCommand = new RelayCommand <EventItemModel>(EditItemCommandExecuted); Event = model; AlreadyBookedCaterings = alreadyBookedCaterings; AlreadyBookedRooms = alreadyBookedRooms; AlreadyBookedGolfs = alreadyBookedGolfs; EventItemsAlreadyBooked = eventItemsAlreadyBooked; }
public AddEventReminderViewModel(EventModel eventModel, EventReminderModel eventReminderModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessEventReminder(eventReminderModel); }
public EventBookingViewModel(EventModel eventModel, bool isDuplicate) { BusyText = "Loading"; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); ShowFindContactWindowCommand = new RelayCommand(ShowFindContactWindowCommandExecuted); ShowAddContactWindowCommand = new RelayCommand(ShowAddContactWindowCommandExecuted); SubmitEventCommand = new RelayCommand(SubmitEventCommandExecuted, SubmitEventCommandCanExecute); CancelEditingCommand = new RelayCommand(CancelEditingCommandExecuted); EditPrimaryContactCommand = new RelayCommand(EditPrimaryContactCommandExecuted, EditPrimaryContactCommandCanExecute); ShowResourcesCommand = new RelayCommand(ShowResourcesCommandExecuted); ProcessEvent(eventModel, isDuplicate); }
public EventItemsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); AddCateringCommand = new RelayCommand(AddCateringCommandExecuted); AddRoomCommand = new RelayCommand(AddRoomCommandExecuted); AddInvoiceCommand = new RelayCommand(AddInvoiceCommandExecuted); AddGolfCommand = new RelayCommand(AddGolfCommandExecuted); FromTemplateCommand = new RelayCommand(FromTemplateCommandExecuted); DeleteItemCommand = new RelayCommand <EventItemModel>(DeleteItemCommandExecuted); EditItemCommand = new RelayCommand <EventItemModel>(EditItemCommandExecuted); }
public AddEventInvoiceItemViewModel(EventModel eventModel, EventInvoiceModel invoiceModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); AddItemCommand = new RelayCommand(AddItemCommandExecuted); CancelCommand = new RelayCommand(CancelCommandExecuted); AddProductCommand = new RelayCommand(AddProductCommandExecuted); DeleteBookedProductCommand = new RelayCommand <EventBookedProductModel>(DeleteBookedProductCommandExecuted); ProcessEventInvoice(invoiceModel); }
public EventRemindersViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); CanDeleteEventReminder = AccessService.Current.UserHasPermissions(Resources.PERMISSION_DELETE_FOLLOWUP_ALLOWED); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminder = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); AddEventReminderCommand = new RelayCommand(AddEventReminderCommandExecuted); DeleteEventReminderCommand = new RelayCommand <EventReminderModel>(DeleteEventReminderCommandExecuted); EditEventReminderCommand = new RelayCommand <EventReminderModel>(EditEventReminderCommandExecuted); AddDefaultEventReminderCommand = new RelayCommand(AddDefaultEventReminderCommandExecuted, AddDefaultEventReminderCommandCanExecute); }
public EventRemindersViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); CanDeleteEventReminder = AccessService.Current.UserHasPermissions(Resources.PERMISSION_DELETE_FOLLOWUP_ALLOWED); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminder = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); AddEventReminderCommand = new RelayCommand(AddEventReminderCommandExecuted); DeleteEventReminderCommand = new RelayCommand<EventReminderModel>(DeleteEventReminderCommandExecuted); EditEventReminderCommand = new RelayCommand<EventReminderModel>(EditEventReminderCommandExecuted); AddDefaultEventReminderCommand = new RelayCommand(AddDefaultEventReminderCommandExecuted, AddDefaultEventReminderCommandCanExecute); }
public AddEventGolfItemViewModel(EventModel eventModel, EventGolfModel golfModel, List <EventGolfModel> alreadyBookedGolfs) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); AddItemCommand = new RelayCommand(AddItemCommandExecuted); CancelCommand = new RelayCommand(CancelCommandExecuted); ShowResourcesCommand = new RelayCommand(ShowResourcesCommandExecuted); AddProductCommand = new RelayCommand(AddProductCommandExecuted); DeleteBookedProductCommand = new RelayCommand <EventBookedProductModel>(DeleteBookedProductCommandExecuted); AlreadyBookedGolfs = alreadyBookedGolfs; ProcessEventGolf(golfModel); }
public AddEventInvoiceItemViewModel(EventModel eventModel, EventInvoiceModel invoiceModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); AddItemCommand = new RelayCommand(AddItemCommandExecuted); CancelCommand = new RelayCommand(CancelCommandExecuted); AddProductCommand = new RelayCommand(AddProductCommandExecuted); DeleteBookedProductCommand = new RelayCommand<EventBookedProductModel>(DeleteBookedProductCommandExecuted); ProcessEventInvoice(invoiceModel); }
public AddEventReminderViewModel(IEnumerable<EventModel> events, EventReminderModel eventReminderModel) { var Today = DateTime.Now; Events = events.Where(x => x.Date.Date > Today.Date).OrderBy(x => x.Date).ThenBy(x => x.Name).ToList(); var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); OpenEventCommand = new RelayCommand(OpenEventCommandExecute, OpenEventCommandCanExecute); if (eventReminderModel != null) { ProcessEventReminder(eventReminderModel); SelectedEvent = Events.FirstOrDefault(x => x.Event == eventReminderModel.EventReminder.Event); _originalEvent = SelectedEvent.Clone(); } else { EventReminder = GetEventReminderWithoutEvent(); EventReminder.PropertyChanged += EventReminderOnPropertyChanged; } }
public AddEventReminderViewModel(EventModel eventModel, EventReminderModel eventReminderModel) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); CanEditEveryoneEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_EVERYONE_FOLLOWUP_ALLOWED); CanEditOwnEventReminders = AccessService.Current.UserHasPermissions(Resources.PERMISSION_EDIT_OWN_FOLLOWUP_ALLOWED); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessEventReminder(eventReminderModel); }
public AddEventReminderViewModel(EventReminderModel eventReminderModel) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); if (eventReminderModel != null) { ProcessEventReminder(eventReminderModel); } else { EventReminder = GetEventReminderWithoutEvent(); EventReminder.PropertyChanged += EventReminderOnPropertyChanged; } }
public AddRoomItemViewModel(EventModel eventModel, EventRoomModel roomModel, List<EventCateringModel> alreadyBookedCaterings, List<EventRoomModel> alreadyBookedRooms) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); AddItemCommand = new RelayCommand(AddItemCommandExecuted); CancelCommand = new RelayCommand(CancelCommandExecuted); AddProductCommand = new RelayCommand(AddProductCommandExecuted); DeleteBookedProductCommand = new RelayCommand<EventBookedProductModel>(DeleteBookedProductCommandExecuted); AlreadyBookedCaterings = alreadyBookedCaterings; AlreadyBookedRooms = alreadyBookedRooms; ProcessEventRoom(roomModel); }
public RemindersViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); DeleteReminderCommand = new RelayCommand<EventReminderModel>(DeleteReminderCommandExecuted); EditReminderCommand = new RelayCommand<EventReminderModel>(EditReminderCommandExecuted); }
public EventItemsAlreadyBookedViewModel(EventModel model, List<EventCateringModel> alreadyBookedCaterings, List<EventRoomModel> alreadyBookedRooms, List<EventGolfModel> alreadyBookedGolfs, ObservableCollection<EventItemModel> eventItemsAlreadyBooked) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); DeleteItemCommand = new RelayCommand<EventItemModel>(DeleteItemCommandExecuted); EditItemCommand = new RelayCommand<EventItemModel>(EditItemCommandExecuted); Event = model; AlreadyBookedCaterings = alreadyBookedCaterings; AlreadyBookedRooms = alreadyBookedRooms; AlreadyBookedGolfs = alreadyBookedGolfs; EventItemsAlreadyBooked = eventItemsAlreadyBooked; }
public EventUpdatesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); }
public UpdatesViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsModuleDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); ShowHistoryCommand = new RelayCommand<EventUpdateModel>(ShowHistoryCommandExecuted); }
public ReminderPopUpViewModel(EventReminderModel eventReminderModel) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); EventReminder = eventReminderModel; SnoozeCommand = new RelayCommand(SnoozeCommandExecute); OpenEventCommand = new RelayCommand(OpenEventCommandExecuted, OpenEventCommandCanExecute); CompleteEventReminderCommand = new RelayCommand(CompleteEventReminderCommandExecuted); DeleteEventReminderCommand = new RelayCommand(DeleteEventReminderCommandExecute); }
public EventBookingViewModel(EventModel eventModel, bool isDuplicate) { BusyText = "Loading"; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); ShowFindContactWindowCommand = new RelayCommand(ShowFindContactWindowCommandExecuted); ShowAddContactWindowCommand = new RelayCommand(ShowAddContactWindowCommandExecuted); SubmitEventCommand = new RelayCommand(SubmitEventCommandExecuted, SubmitEventCommandCanExecute); CancelEditingCommand = new RelayCommand(CancelEditingCommandExecuted); EditPrimaryContactCommand = new RelayCommand(EditPrimaryContactCommandExecuted, EditPrimaryContactCommandCanExecute); ShowResourcesCommand = new RelayCommand(ShowResourcesCommandExecuted); ProcessEvent(eventModel, isDuplicate); }
public EventsViewModel() { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); AddEventCommand = new RelayCommand(AddEventCommandExecuted, AddEventCommandCanExecute); DeleteEventCommand = new RelayCommand<EventModel>(DeleteEventCommandExecuted, DeleteEventCommandCanExecute); EditEventCommand = new RelayCommand<EventModel>(EditEventCommandExecuted, EditEventCommandCanExecute); DuplicateEventCommand = new RelayCommand(DuplicateEventCommandExecuted, DuplicateEventCommandCanExecute); RefreshEventsCommand = new RelayCommand(RefreshEventsCommandExecuted); ShowTodayEventsCommand = new RelayCommand(ShowTodayEventsCommandExecuted); ShowWeekEventsCommand = new RelayCommand(ShowWeekEventsCommandExecuted); ShowMonthEventsCommand = new RelayCommand(ShowMonthEventsCommandExecuted); ShowFutureEventsCommand = new RelayCommand(ShowFutureEventsCommandExecuted); ShowDefaultEventsCommand = new RelayCommand(ShowDefaultEventsCommandExecuted, ShowDefaultEventsCommandCanExecute); ShowResourcesCommand = new RelayCommand(ShowResourcesCommandExecuted); AddToDoCommand = new RelayCommand(AddToDoCommandExecute); AddEnquiryCommand = new RelayCommand(AddEnquiryCommandExecute); AddCalendarNoteCommand = new RelayCommand(AddCalendarNoteCommandExecuted); EditCalendarNoteCommand = new RelayCommand<CalendarNoteModel>(EditCalendarNoteCommandExecuted); DeleteCalendarNoteCommand = new RelayCommand<CalendarNoteModel>(DeleteCalendarNoteCommandExecuted); DeleteEventNoteCommand = new RelayCommand<EventModel>(DeleteEventNoteCommandExecuted); AddReminderCommand = new RelayCommand(AddReminderCommandExecuted); ShowEventSynopsisReportCommand = new RelayCommand(ShowEventSynopsisReportCommandExecuted); ShowCalendarReportCommand = new RelayCommand(ShowCalendarReportCommandExecuted); CalendarColorFilterItems = new ObservableCollection<string>() { "Type", "Status" }; SelectedCalendarColorFilterItem = CalendarColorFilterItems.First(); // Default filter is Type }
public NewEnquiryViewModel(EnquiryModel enquiryModel) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _crmDataUnit = dataUnitLocator.ResolveDataUnit<ICrmDataUnit>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); //_crmDataUnit.EnquiriesRepository.RevertAllChanges(); ShowFindContactWindowCommand = new RelayCommand(ShowFindContactWindowCommandExecuted); ShowAddContactWindowCommand = new RelayCommand(ShowAddContactWindowCommandExecuted); SubmitEventCommand = new RelayCommand(SubmitEventCommandExecuted, SubmitEventCommandCanExecute); CancelEditingCommand = new RelayCommand(CancelEditingCommandExecuted); EditPrimaryContactCommand = new RelayCommand(EditPrimaryContactCommandExecuted, EditPrimaryContactCommandCanExecute); ShowResourcesCommand = new RelayCommand(ShowResourcesCommandExecuted, ShowResourcesCommandCanExecute); BookCommand = new RelayCommand(BookCommandExecute, BookCommandCanExecute); ProcessEnquiry(enquiryModel); }
public ProductsViewModel(ProductType productType) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _adminDataUnit = dataUnitLocator.ResolveDataUnit<IAdminDataUnit>(); _reportsDataUnit = dataUnitLocator.ResolveDataUnit<IReportsDataUnit>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SelectedProductType = productType; DeleteProductCommand = new RelayCommand<ProductModel>(DeleteProductCommandExecuted); EditProductCommand = new RelayCommand<ProductModel>(EditProductCommandExecuted); }
public SendEventMailViewModel(EventModel eventModel, CorrespondenceModel mail) { _event = eventModel; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SubmitCommand = new RelayCommand(SubmitCommandExecuted, SubmitCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecuted); ProcessMail(mail); }