Exemple #1
0
 public bool Insertar()
 {
     ConexionDB cdb = new ConexionDB();
     string sql = "INSERT INTO Estudiantes(Matricula, Nombres, Apellidos, Direccion, Genero, FechaNacimiento, Email, Telefono, Celular) " +
                      "VALUES ('" + Matricula + "','" + Nombres + "','" + Apellidos + "','" +
                      Direccion + "',  " + Genero + " ,'" + FechaNacimiento + "','" + Email + "','" + Telefono + "','" + Celular + "')";
     return cdb.EjecutarComando(sql);
 }
Exemple #2
0
    public void Modificar(string matricula)
    {
        ConexionDB cdb = new ConexionDB();
        string sql = "UPDATE Estudiantes SET Nombres = '" + Nombres + "', Apellidos = '" + Apellidos + "', Direccion = '" + Direccion +
            "', Genero = " + Genero + ", FechaNacimiento = '" + FechaNacimiento + "', Email = '" + Email + "', Telefono = '" + Telefono + "', Celular = '" + Celular +
            "' WHERE Matricula = " + matricula;

        cdb.EjecutarComando(sql);
    }
Exemple #3
0
 public bool Eliminar(string matricula)
 {
     ConexionDB cdb = new ConexionDB();
     string sql = "DELETE Estudiantes WHERE Matricula =" + matricula;
     return cdb.EjecutarComando(sql);
 }