public RegisterClientsPageViewModel(
            INavigationService navigationService,
            IClientsAppService clientsAppService,
            IUserAppService userAppService,
            ISeasonAppService seasonAppService,
            ITrophyAppService trophyAppService,
            IGamificationPointsAppService gamificationPointsAppService,
            IChallengesAppService challengesAppService,
            IUserDialogs userDialogs)
        {
            _navigationService            = navigationService;
            _clientsAppService            = clientsAppService;
            _userAppService               = userAppService;
            _trophyAppService             = trophyAppService;
            _gamificationPointsAppService = gamificationPointsAppService;
            _challengesAppService         = challengesAppService;
            _seasonAppService             = seasonAppService;
            _userDialogs = userDialogs;

            ClientSelectedForEdition = new Client();
            OpenPopupDateCommand     = new DelegateCommand(OpenDatePopup).ObservesCanExecute(() => CanExecute);
            RegisterNewClientCommand = new DelegateCommand(RegisterNewClient).ObservesCanExecute(() => CanExecute);
            AnniversaryDate          = DatePlaceholder;
            ColorDateAnniversary     = Color.FromHex("#d5d5d5");
        }
Exemplo n.º 2
0
 public RankingPageViewModel(
     INavigationService navigationService,
     IUserDialogs userDialogs,
     IChallengesAppService challengesAppService,
     ISeasonAppService seasonAppService,
     IUserAppService userAppService,
     ISalesAppService salesAppService,
     IClientsAppService clientsAppService)
 {
     _navigationService               = navigationService;
     _userDialogs                     = userDialogs;
     _challengesAppService            = challengesAppService;
     _seasonAppService                = seasonAppService;
     _userAppService                  = userAppService;
     _salesAppService                 = salesAppService;
     _clientsAppService               = clientsAppService;
     GoToRankingPageCommand           = new DelegateCommand <RankingBannerDto>(GoToRankingPage).ObservesCanExecute(() => CanExecute);
     GoToCurrentChallengesPageCommand = new DelegateCommand(GoToCurrentChallengesPage).ObservesCanExecute(() => CanExecute);
     GoToAvgPiecesForSalePageCommand  = new DelegateCommand(GoToAvgPiecesForSalePage).ObservesCanExecute(() => CanExecute);
     GoToAvgTicketPageCommand         = new DelegateCommand(GoToAvgTicketPage).ObservesCanExecute(() => CanExecute);
     GoToEffectedSalesPageCommand     = new DelegateCommand(GoToEffectedSalesPage).ObservesCanExecute(() => CanExecute);
     GoToGeneralRankingPageCommand    = new DelegateCommand(GoToGeneralRankingPage).ObservesCanExecute(() => CanExecute);
     GoToInviteFlowerPageCommand      = new DelegateCommand(GoToInviteFlowerPage).ObservesCanExecute(() => CanExecute);
     GoToRegisterClientsPageCommand   = new DelegateCommand(GoToRegisterClientsPage).ObservesCanExecute(() => CanExecute);
     InitializeRankings();
 }
Exemplo n.º 3
0
 public ListClientsForSalePageViewModel(INavigationService navigationService,
                                        IClientsAppService clientsAppService)
 {
     _navigationService     = navigationService;
     _clientAppService      = clientsAppService;
     ListaClientes          = new ObservableCollection <Client>();
     ClienteSelectedCommand = new DelegateCommand <Client>(async param => await SelecionarCliente(param))
                              .ObservesCanExecute(() => CanExecute);
     GoToRegisterClientCommand = new DelegateCommand(GoToRegisterClient).ObservesCanExecute(() => CanExecute);
 }
 public CurrentChallengesPageViewModel(ITrophyAppService trophyAppService,
                                       IUserAppService userAppService,
                                       ISalesAppService salesAppService,
                                       IClientsAppService clientsAppService)
 {
     _userAppService    = userAppService;
     _trophyAppService  = trophyAppService;
     _salesAppService   = salesAppService;
     _clientsAppService = clientsAppService;
     Challenges         = new ObservableCollection <Challenge>();
 }
Exemplo n.º 5
0
 public MyClientsPageViewModel(
     INavigationService navigationService,
     IClientsAppService clientsAppService)
 {
     _navigationService = navigationService;
     _clientsAppService = clientsAppService;
     ListaClientes      = new ObservableCollection <Client>();
     EditClientCommand  = new DelegateCommand <object>(async param => await EditClient(param))
                          .ObservesCanExecute(() => CanExecute);
     RemoveClientCommand = new DelegateCommand <object>(async param => RemoveClient(param))
                           .ObservesCanExecute(() => CanExecute);
     RegisterNewClientCommand = new DelegateCommand(RegisterNewClient).ObservesCanExecute(() => CanExecute);
     ClientSelectedCommand    = new DelegateCommand(ClientSelected);
 }
Exemplo n.º 6
0
 public LandingPageViewModel(
     ISeasonAppService seasonAppService,
     INavigationService navigationService,
     IGamificationPointsAppService gamificationPointsAppService,
     IUserAppService userAppService,
     IClientsAppService clientsAppService,
     IChallengesAppService challengesAppService,
     ITrophyAppService trophyAppService)
 {
     _seasonAppService             = seasonAppService;
     _navigationService            = navigationService;
     _gamificationPointsAppService = gamificationPointsAppService;
     _userAppService       = userAppService;
     _clientsAppService    = clientsAppService;
     _challengesAppService = challengesAppService;
     _trophyAppService     = trophyAppService;
 }
Exemplo n.º 7
0
        public LoginPageViewModel(
            INavigationService navigationService,
            IUserAppService userAppService,
            IUserDialogs userDialogs,
            IChallengesAppService challengesAppService,
            ISeasonAppService seasonAppService,
            ISalesAppService salesAppService,
            IClientsAppService clientsAppService)
        {
            _navigationService    = navigationService;
            _userAppService       = userAppService;
            _userDialogs          = userDialogs;
            _challengesAppService = challengesAppService;
            _seasonAppService     = seasonAppService;
            _salesAppService      = salesAppService;
            _clientsAppService    = clientsAppService;

            LoginCommand         = new DelegateCommand(ExecuteLogin).ObservesCanExecute(() => CanExecute);
            ResetPasswordCommand = new DelegateCommand(ResetPassword).ObservesCanExecute(() => CanExecute);

            CacheAccess.Initialize();
        }