public void InsertarMatri(DfichaMatri dtp) { Comando.Connection = Conexion.AbrirConexion(); Comando.CommandText = "insert into Ficha_Matricula values('" + dtp.get_anio() + "'," + "'" + dtp.get_tipoalumno() + "','" + dtp.get_estadoalum() + "','" + dtp.get_profesor() + "'," + "'" + dtp.get_tipoensenanza() + "','" + dtp.get_grado() + "','" + dtp.get_curso() + "'," + "'" + dtp.get_rut_p() + "','" + dtp.get_fechaingreso() + "','" + dtp.get_fecharetiro() + "','" + dtp.get_fechaegreso() + "')"; Comando.CommandType = CommandType.Text; Comando.ExecuteNonQuery(); Comando.Parameters.Clear(); }
public void ModificarMatri(DfichaMatri dtp) { Comando.Connection = Conexion.AbrirConexion(); Comando.CommandText = "Update Personas set id_anio = '" + dtp.get_anio() + "', id_tipoalumno = '" + dtp.get_tipoalumno() + "'," + "id_estadoalum = '" + dtp.get_estadoalum() + "',id_profesor ='" + dtp.get_profesor() + "', id_tipo_ensenaza ='" + dtp.get_tipoensenanza() + "'," + "id_grado = '" + dtp.get_grado() + "',id_curso = '" + dtp.get_curso() + "', Fecha_ingreso ='" + dtp.get_fechaingreso() + "'," + "Fecha_retiro = '" + dtp.get_fecharetiro() + "', Fecha_egreso = '" + dtp.get_fechaegreso() + "', id_rut ='" + dtp.get_rut_p() + "' where Nro_Matricula = '" + dtp.get_Nro_Matricula() + "'"; Comando.CommandType = CommandType.Text; Comando.ExecuteNonQuery(); Comando.Parameters.Clear(); }