Beispiel #1
0
 public VistoriaNovaDetailViewModel(VistoriaDTO vistoria)
 {
     _vistoriaService = Xamarin.Forms.DependencyService.Get <Services.Interface.IVistoriasService>();
     Vistoria         = vistoria;
     ToVoltarCommand  = new Command(toVoltar);
     ToSalvarCommand  = new Command(toSalvar);
     ToGetAllCommand  = new Command(ToGetAllAsync);
 }
Beispiel #2
0
        private void toSalvar()
        {
            Vistoria.IdUsuario = 1;
            Task <int> retorno = _vistoriaService.Save(Vistoria);

            VistoriaDTO v = new VistoriaDTO()
            {
                VeiculoNome  = "Kia Soul",
                VeiculoPlaca = "EUY9127",
                Descricao    = "Falar com o Marcio",
                Endereco     = "Rua Cantagalo 223",
                FoiEnviado   = false,
                IdUsuario    = 2,
                Thumbnail    = "http://www.leftcoastclassics.com/1962-ford-galaxy/extras/bodygallery/slides/1962-ford-galaxy-300.jpg"
            };

            Task <int> r = _vistoriaService.Save(v);

            Debug.WriteLine(retorno);
        }
        //public Task<int> Save(VistoriaDTO obj)
        //{
        //   return new VistoriasRepository().Save(obj);
        //}

        public Task <int> Save(VistoriaDTO obj)
        {
            return(null);
        }
 private void verVistoria(VistoriaDTO vistoria)
 {
     _navigationService.NavigateToVistoriaNovaDetail(vistoria);
 }