public BaseViewModel(INavigationService inavigationServices, IPageDialogService dialogService, IApiCore apiCore) { this.navigationService = inavigationServices; this.dialogService = dialogService; this.apiCore = apiCore; }
public UsersPageViewModel(INavigationService navigationServices, IPageDialogService dialogService, IApiCore apiCore) : base(navigationServices, dialogService, apiCore) { LoadUserList = new DelegateCommand(async() => { await LoadUsers(); }); LoadUserList.Execute(); GoToRegisterUserPageCommand = new DelegateCommand(async() => { await navigationService.NavigateAsync(ConfigPage.RegisterUserPage); }); }
public HomePageViewModel(INavigationService navigationServices, IPageDialogService dialogService, IApiCore apiCore) : base(navigationServices, dialogService, apiCore) { Datas = new ObservableCollection <Data>() { new Data { Name = "Clientes", Quantity = 200 }, new Data { Name = "Empleados", Quantity = 100 }, new Data { Name = "Transaciones", Quantity = 2000 }, }; DataTransaction = new ObservableCollection <Data>() { new Data { Date_Time = DateTime.Now, Quantity = 200 }, new Data { Date_Time = DateTime.Now, Quantity = 100 }, new Data { Date_Time = DateTime.Now, Quantity = 2000 }, }; }
public RegisterUserPageViewModel(INavigationService inavigationServices, IPageDialogService dialogService, IApiCore apiCore) : base(inavigationServices, dialogService, apiCore) { AccountTypes = new List <UserAccountType>() { new UserAccountType() { ID = 1, Name = "Admin" }, new UserAccountType() { ID = 2, Name = "Empleado" }, new UserAccountType() { ID = 1, Name = "Cliente" }, }; SaveUserCommand = new DelegateCommand(async() => { User.TipoCuenta = SelectAccountType.Name; await InsertUser(User); }); }
public RegisterClientPageViewModel(INavigationService inavigationServices, IPageDialogService dialogService, IApiCore apiCore) : base(inavigationServices, dialogService, apiCore) { Random ran = new Random(); AccountTypes = new List <AccountType>() { new AccountType() { ID = 1, Name = "Corriente" } }; Genders = new List <Gender>() { new Gender() { Name = "Masculino" }, new Gender() { Name = "Femenino" }, }; SaveCommand = new DelegateCommand(async() => { Account.IdCuenta = ran.Next(999999999); Client.Account = Account.IdCuenta; Client.Gender = SelectGender.Name; Account.Cedula = Client.IdCard; Client.Account = Account.IdCuenta; Account.TipoCuenta = SelectAccount.Name; await InsertClient(Client, Account); }); }
public ClientsPageViewModel(INavigationService navigationServices, IPageDialogService dialogService, IApiCore apiCore) : base(navigationServices, dialogService, apiCore) { LoadList = new DelegateCommand(async() => { await LoadClients(); }); LoadList.Execute(); AddClientCommand = new DelegateCommand(async() => { await navigationService.NavigateAsync(new Uri(ConfigPage.RegisterClientPage, UriKind.Relative)); }); }