Exemple #1
0
        public ClienteDetailPage()
        {
            InitializeComponent();
            IAppApiServices appApiServices = DependencyService.Get <IAppApiServices>();

            BindingContext = new ClienteDetailViewModel(appApiServices);
        }
Exemple #2
0
        public ClienteViewModel(IAppApiServices appApiServices)
        {
            _appApiServices = appApiServices;

            ShowContentCommand = new Command <Cliente>(ExecuteShowContentCommand);

            Title = "Clientes";


            var clientes = new ObservableCollection <Models.Cliente>(_appApiServices.GetClientesAsync().Result);

            Cliente = new ObservableCollection <Models.Cliente>();
            int i = 0;

            foreach (var content in clientes.OrderBy(x => x.Nome))
            {
                i++;
                if (i % 2 == 0)
                {
                    content.BackgroundColor = Color.WhiteSmoke;
                }
                else
                {
                    content.BackgroundColor = Color.White;
                }

                Cliente.Add(content);
            }
        }
        public LoginPage()
        {
            InitializeComponent();
            IAppApiServices appApiServices = DependencyService.Get <IAppApiServices>();

            BindingContext = new LoginViewModel(appApiServices);
        }
Exemple #4
0
        public LoginViewModel(IAppApiServices appApiServices)
        {
            _appApiServices = appApiServices;

            LoginCommand     = new Command(ExecuteLoginCommand);
            CadastrarCommand = new Command(ExecuteCadastrarCommand);

            Title = "Login";
        }
 public MinhaMasterDetailViewModel(IAppApiServices appApiServices)
 {
     Title = "Clientes";
 }