示例#1
0
        private void Insertar_Clicked(object sender, EventArgs e)
        {
            var datos = new TESHDatos
            {
                Nombre    = Convert.ToInt32(Entry_Nom.Text),
                Apellidos = Entry_Ape.Text,
                Direccion = Entry_Dir.Text,
                Telefono  = Entry_Tel.Text,
                Carrera   = Entry_carr.Text,
                Semestre  = Entry_Sem.Text,
                Matricula = Entry_Matric.Text,
                Correo    = Entry_Cor.Text,
                Github    = Entry_Git.Text
            };

            database.Insert(datos);
            Navigation.PushModalAsync(new DetailPageBD());

            /* var datos = new TESHDatos
             * {
             *   Matricula = Convert.ToInt32(Entry_ID.Text),
             *   Nombre = Entry_Name.Text,
             *   Apellidos = Entry_Ap.Text,
             *   Direccion = Entry_Dir.Text,
             *   Telefono = Entry_Tel.Text,
             *   Carrera = Entry_Car.Text,
             *   Semestre = Entry_Sem.Text,
             *   Correo = Entry_Cor.Text,
             *   Github = Entry_Git.Text
             * };
             * database.Insert(datos);
             * Navigation.PushAsync(new BasedeDatos());*/
        }
        private void ButtonActualizar_Clicked(object sender, EventArgs e)
        {
            var datos = new TESHDatos
            {
                Nombre = Convert.ToInt32(Entry_Nom.Text),
            };

            database.Update(datos);
        }