/// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public TravelRequestFormViewModel(INavigationService navService, ISampleDataService sampleDataService, IMyCompanyClient myCompanyClient)
 {
     this.navService        = navService;
     this.sampleDataService = sampleDataService;
     this.myCompanyClient   = myCompanyClient;
     SubscribeCommands();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public VMMainPage(
            INavigationService navService,
            IMyCompanyClient clientService,
            IMessageService messageService,
            ITilesService tilesService,
            ISampleDataService sampleDataService,
            IDispatcherService dispatcherService)
        {
            this.navService        = navService;
            this.clientService     = clientService;
            this.messageService    = messageService;
            this.tilesService      = tilesService;
            this.sampleDataService = sampleDataService;
            this.dispatcherService = dispatcherService;

            loader = ResourceLoader.GetForCurrentView();
            InitializeCommands();


            if (base.IsInDesignMode)
            {
                InitializeMockedData();
            }

            if (!base.IsInDesignMode)
            {
                InitializeNotifications();
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public VMAuthenticatedEmployee(IMyCompanyClient clientService)
 {
     this.clientService = clientService;
     if (!base.IsInDesignMode)
     {
         InitializeData();
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="navigationService"></param>
        /// <param name="myCompanyClient"></param>
        /// <param name="tileService"></param>
        public VMExpenseDetail(INavigationService navigationService, IMyCompanyClient myCompanyClient, ITileService tileService)
        {
            this.myCompanyClient   = myCompanyClient;
            this.navigationService = navigationService;
            this.tileService       = tileService;

            InitializeCommand();
        }
Exemplo n.º 5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public VMNewVisitorPage(INavigationService navService, IMyCompanyClient clientService, IMessageService messageService, IStorageService storageService)
 {
     this.navService     = navService;
     this.clientService  = clientService;
     this.messageService = messageService;
     this.storageService = storageService;
     InitializeCommands();
 }
Exemplo n.º 6
0
        /// <summary>
        /// Constructor
        /// </summary>
        public VMAddExpense(IMyCompanyClient myCompanyClient, INavigationService navService, IPhotoService photoService)
        {
            this.myCompanyClient = myCompanyClient;
            this.navService      = navService;
            this.photoService    = photoService;

            InitializeCommand();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="navigationService">navigation service</param>
        /// <param name="myCompanyClient">myCompany client</param>
        public VMExpenseList(INavigationService navigationService, IMyCompanyClient myCompanyClient)
        {
            this.navigationService = navigationService;
            this.myCompanyClient   = myCompanyClient;

            LoadData();
            InitializeCommands();
            RegisterMessages();
        }
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public MainViewModel(
     INavigationService navService,
     ISampleDataService sampleDataService,
     IMyCompanyClient myCompanyClient)
 {
     this.navService        = navService;
     this.sampleDataService = sampleDataService;
     this.myCompanyClient   = myCompanyClient;
     Messenger.Default.Register <LoadingMessage>(this, HandleLoadingMessage);
     Messenger.Default.Register <CustomDialogMessage>(this, HandleDialogMessage);
 }
        /// <summary>
        /// Initializes a new instance of the TravelListViewModel class.
        /// </summary>
        public TravelListViewModel(INavigationService navService, ISampleDataService sampleDataService, IMyCompanyClient myCompanyClient)
        {
            this.navService        = navService;
            this.sampleDataService = sampleDataService;
            this.myCompanyClient   = myCompanyClient;
            SubscribeCommands();

            if (base.IsInDesignMode)
            {
                InitializeMockedData();
            }
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 public VMNewVisitPage(INavigationService navService, IMyCompanyClient clientService,
                       IMessageService messageService)
 {
     this.navService     = navService;
     this.clientService  = clientService;
     this.messageService = messageService;
     if (base.IsInDesignMode)
     {
         Visitor  = new Visitor();
         Employee = new Employee();
     }
     InitializeCommands();
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 public VMSearchVisitorPage(INavigationService navService, IMyCompanyClient clientService,
                            IMessageService messageService, ISampleDataService sampleDataService)
 {
     this.navService        = navService;
     this.clientService     = clientService;
     this.messageService    = messageService;
     this.sampleDataService = sampleDataService;
     InitializeCommands();
     if (base.IsInDesignMode)
     {
         InitializeMockedData();
     }
 }
Exemplo n.º 12
0
        /// <summary>
        /// Get logged user information
        /// </summary>
        /// <param name="myCompanyClient">Service client</param>
        public static async Task GetLoggedUserInformation(IMyCompanyClient myCompanyClient)
        {
            var info = await myCompanyClient.EmployeeService.GetLoggedEmployeeInfo(PictureType.Small);

            if (info != null)
            {
                AppSettings.EmployeeInformation = info;

                if (info.IsManager)
                {
                    Messenger.Default.Send <TeamManagerMessage>(new TeamManagerMessage());
                }
            }
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        public VMVisitDetailPage(
            INavigationService navService,
            IMyCompanyClient clientService,
            IMessageService messageService,
            ITilesService tilesService,
            ISampleDataService sampleDataService,
            IStorageService storageService,
            IDispatcherService dispatcherService)
        {
            this.navService        = navService;
            this.clientService     = clientService;
            this.messageService    = messageService;
            this.tilesService      = tilesService;
            this.sampleDataService = sampleDataService;
            this.storageService    = storageService;
            this.dispatcherService = dispatcherService;

            InitializeCommands();
            if (base.IsInDesignMode)
            {
                InitializeMockedData();
            }
        }
 /// <summary>
 /// Default constructor
 /// </summary>
 public VMMain(IMyCompanyClient myCompanyClient, INotificationService notificationService)
 {
     this.myCompanyClient     = myCompanyClient;
     this.notificationService = notificationService;
     MessengerInstance.Register <ReloadMainViewMessage>(this, ReloadNeeded);
 }
 public void InitializeData(IMyCompanyClient clientService)
 {
     this.ClientService = clientService;
     InitializeData();
 }
Exemplo n.º 16
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="navigationService">navigation service</param>
 /// <param name="myCompanyClient">myCompany client</param>
 public VMTeamHistory(INavigationService navigationService, IMyCompanyClient myCompanyClient)
     : base(navigationService, myCompanyClient)
 {
 }
Exemplo n.º 17
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="navigationService">navigation service</param>
 /// <param name="myCompanyClient">myCompany client</param>
 /// <param name="tileService">tile service</param>
 public VMUserHistory(INavigationService navigationService, IMyCompanyClient myCompanyClient, ITileService tileService)
     : base(navigationService, myCompanyClient)
 {
     this.tileService      = tileService;
     this.PropertyChanged += VMUserHistory_PropertyChanged;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="navigationService">navigation service</param>
 /// <param name="myCompanyClient">myCompany client</param>
 public VMTeamPendings(INavigationService navigationService, IMyCompanyClient myCompanyClient)
     : base(navigationService, myCompanyClient)
 {
 }
Exemplo n.º 19
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public VMAuthentication(INavigationService navService, IMyCompanyClient myCompanyClient)
 {
     this.navService      = navService;
     this.myCompanyClient = myCompanyClient;
 }