Example #1
0
        public MainPage()
        {
            InitializeComponent();
            string db;

            db       = DependencyService.Get <ISQLite>().GetLocalFilePath("DatsFor.db");
            database = new SQLiteConnection(db);
            database.CreateTable <FormuDatos>();
            var elemento = new FormuDatos()
            {
                Id     = 1,
                Dato1  = "Sofia",
                Dato2  = "Juarez",
                Dato3  = "Flores",
                Dato4  = "San Lorenzo",
                Dato5  = 555678906,
                Dato6  = "Ing.Sistemas Computacionales",
                Dato7  = "Tercero",
                Dato8  = 13090354,
                Dato9  = "*****@*****.**",
                Dato10 = "sofyajf"
            };

            Items          = new ObservableCollection <FormuDatos>(database.Table <FormuDatos>());
            BindingContext = this;
        }
Example #2
0
        public DataPage()
        {
            InitializeComponent();
            string db;

            db       = DependencyService.Get <ISQLite>().GetLocalFilePath("DatsFor.db");
            database = new SQLiteConnection(db);
            database.CreateTable <FormuDatos>();
            var elemento = new FormuDatos();


            Items          = new ObservableCollection <FormuDatos>(database.Table <FormuDatos>());
            BindingContext = this;
        }
Example #3
0
        private void Button_Eliminar_Clicked(object sender, EventArgs e)
        {
            var datos = new FormuDatos
            {
                Id     = Convert.ToInt32(Entry_Id.Text),
                Dato1  = Entry_Nombre.Text,
                Dato2  = Entry_Apellido_Paterno.Text,
                Dato3  = Entry_Apellido_Materno.Text,
                Dato4  = Entry_Direccion.Text,
                Dato5  = Convert.ToInt64(Entry_Telefono.Text),
                Dato6  = Convert.ToString(Picker_Semestre.SelectedItem),
                Dato7  = Convert.ToString(Picker_Semestre.SelectedItem),
                Dato8  = Convert.ToInt32(Entry_Matricula.Text),
                Dato9  = Entry_Correo.Text,
                Dato10 = Entry_GitHub.Text
            };

            database.Delete(datos);
            Navigation.PushAsync(new DataPage());
        }