Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public UpdatesViewModel()
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>();

            _eventsModuleDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>();
            ShowHistoryCommand    = new RelayCommand <EventUpdateModel>(ShowHistoryCommandExecuted);
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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;
            }
        }
Ejemplo n.º 5
0
        public FromTemplateViewModel(EventModel eventModel)
        {
            _event = eventModel;
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>();

            _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>();
            OKCommand       = new RelayCommand(OKCommandExecuted, OKCommandCanExecute);
        }
Ejemplo n.º 6
0
        public UpdatedRemindersViewModel(ObservableCollection<EventReminderModel> eventRemindersToBeUpdated)
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
            _eventDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();
            EventRemindersToBeUpdated = eventRemindersToBeUpdated;
            UpdateRemindersCommand = new RelayCommand(UpdateRemindersCommandExecuted);

        }
Ejemplo n.º 7
0
        public RemindersViewModel()
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>();

            _eventDataUnit        = dataUnitLocator.ResolveDataUnit <IEventDataUnit>();
            DeleteReminderCommand = new RelayCommand <EventReminderModel>(DeleteReminderCommandExecuted);
            EditReminderCommand   = new RelayCommand <EventReminderModel>(EditReminderCommandExecuted);
        }
Ejemplo n.º 8
0
        public EventCorrespondenceViewModel()
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
            _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();

            SendEmailCommand = new RelayCommand(SendEmailCommandExecuted);
            ShowCorrespondenceCommand = new RelayCommand<CorrespondenceModel>(ShowCorrespondenceCommandExecuted);
        }
Ejemplo n.º 9
0
        public UpdatedRemindersViewModel(ObservableCollection <EventReminderModel> eventRemindersToBeUpdated)
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>();

            _eventDataUnit            = dataUnitLocator.ResolveDataUnit <IEventDataUnit>();
            EventRemindersToBeUpdated = eventRemindersToBeUpdated;
            UpdateRemindersCommand    = new RelayCommand(UpdateRemindersCommandExecuted);
        }
Ejemplo n.º 10
0
        public FromTemplateViewModel(EventModel eventModel)
        {
            _event = eventModel;
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
            _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();
            OKCommand = new RelayCommand(OKCommandExecuted, OKCommandCanExecute);

        }
Ejemplo n.º 11
0
        public EventCorrespondenceViewModel()
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve <IDataUnitLocator>();

            _eventsDataUnit = dataUnitLocator.ResolveDataUnit <IEventDataUnit>();

            SendEmailCommand          = new RelayCommand(SendEmailCommandExecuted);
            ShowCorrespondenceCommand = new RelayCommand <CorrespondenceModel>(ShowCorrespondenceCommandExecuted);
        }
Ejemplo n.º 12
0
        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);
        }
Ejemplo n.º 13
0
        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);
        }
Ejemplo n.º 15
0
        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;
        }
Ejemplo n.º 16
0
        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);
        }
Ejemplo n.º 17
0
        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;
        }
Ejemplo n.º 18
0
        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);
        }
Ejemplo n.º 19
0
        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;
        }
Ejemplo n.º 20
0
        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);
        }
Ejemplo n.º 21
0
        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);
        }
Ejemplo n.º 22
0
        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);
        }
Ejemplo n.º 23
0
        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);
        }
Ejemplo n.º 24
0
        //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);
        }
Ejemplo n.º 25
0
        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);
        }
Ejemplo n.º 26
0
        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);
        }
Ejemplo n.º 27
0
        }                                              // 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();
        }
Ejemplo n.º 28
0
        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);
        }
Ejemplo n.º 29
0
        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);
        }
Ejemplo n.º 30
0
        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);
        }
Ejemplo n.º 31
0
        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();
        }
Ejemplo n.º 32
0
        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);
        }
Ejemplo n.º 33
0
        //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);
        }
Ejemplo n.º 34
0
        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);
        }
Ejemplo n.º 35
0
        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);
        }
Ejemplo n.º 36
0
        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();
        }
Ejemplo n.º 37
0
        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);
        }
Ejemplo n.º 38
0
        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;
        }
Ejemplo n.º 39
0
        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);
        }
Ejemplo n.º 40
0
        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);
        }
Ejemplo n.º 41
0
        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);
        }
Ejemplo n.º 42
0
        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);
        }
Ejemplo n.º 43
0
        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);
        }
Ejemplo n.º 44
0
        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);

        }
Ejemplo n.º 45
0
        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);
        }
Ejemplo n.º 46
0
        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);
        }
Ejemplo n.º 47
0
        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;
            }

        }
Ejemplo n.º 48
0
        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);
        }
Ejemplo n.º 49
0
        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;
            }
        }
Ejemplo n.º 50
0
        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);
        }
Ejemplo n.º 51
0
 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;

        }
Ejemplo n.º 53
0
 public EventUpdatesViewModel()
 {
     var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
     _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();
 }
Ejemplo n.º 54
0
 public UpdatesViewModel()
 {
     var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
     _eventsModuleDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();
     ShowHistoryCommand = new RelayCommand<EventUpdateModel>(ShowHistoryCommandExecuted);
 }
Ejemplo n.º 55
0
        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);
        }
Ejemplo n.º 56
0
        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);

        }
Ejemplo n.º 57
0
        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

        }
Ejemplo n.º 58
0
        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);
        }
Ejemplo n.º 59
0
        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);

        }
Ejemplo n.º 60
0
        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);
        }