public void modificar(EntidadEstudiante entidad) { sql = "update estudiante set " + "nombre ='" + entidad.Nombre + "'," + "apellido = '" + entidad.Apellido + "'," + "direccion = '" + entidad.Direccion + "'," + "edad = " + entidad.Edad + "," + "id_curso = " + entidad.Id_curso + " where " + "id_estudiante = " + entidad.Id_estudiante; mod.ejecutarSQL(sql); }
public void insertar(EntidadEstudiante entidad) { sql = "insert into estudiante (" + "id_estudiante," + "nombre," + "apellido," + "direccion," + "edad," + "id_curso" + ") VALUES (" + entidad.Id_estudiante + "," + "'" + entidad.Nombre + "'," + "'" + entidad.Apellido + "'," + "'" + entidad.Direccion + "'," + "" + entidad.Edad + "," + entidad.Id_curso + ")"; mod.ejecutarSQL(sql); }