async void RegistrarColle(object sender, System.EventArgs e) { if (await validarFormulario()) { var dbpath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UserDatabase.db"); var db = new SQLiteConnection(dbpath); db.CreateTable <CollectionViewTable>(); var item = new CollectionViewTable() { Id = DateTime.Now.ToString(), nombre = EntryName.Text, tipo = EntryType.Text, imagen = labelpath.Text, fecha_creacion = DateTime.Now.ToString(), IdUsuario = this.idusu }; //db.Insert(item); Device.BeginInvokeOnMainThread(async() => { //var result = await this.DisplayAlert("Agregada!", "Colección agregada con la ID: " + item.Id, "OK", "Cancelar"); //if (result) await Navigation.PushAsync(new VerCamposCustom(item)); //await Navigation.PopAsync(); }); } }
public VerCamposCustom(CollectionViewTable coleccion) { this.idCollect = coleccion.Id; this.objetoColeccion = coleccion; SetValue(NavigationPage.HasNavigationBarProperty, false); InitializeComponent(); Title = "Campos Personalizados"; Init(); }