Exemplo n.º 1
0
        public static int insertProfesor(Profesor profesor)
        {
            MySqlConnection connection = new MySqlConnection(connecString);
            connection.Open();
            MySqlCommand command = connection.CreateCommand();

            command.CommandText = "insert into profesor (codigo,nombre,dni,correo,telefono,idioma,año,grado,especialidad,fechaIni,fechaRev,fechaFin,categoria,estutor) values('"+profesor.Codigo+"','" + profesor.Nombre + "','" + profesor.Dni + "','" + profesor.Correo + "','" + profesor.Telefono + "','" + profesor.Idioma + "','" + profesor.AnosExp + "','" + profesor.GradoAcademico + "','" + profesor.Especialidad.Codigo + "','" + profesor.FechaIngreso + "','" + profesor.FechaRevalidacion + "','" + profesor.FechaFinCategoria + "','" + profesor.Categoria + "','1');";

            try
            {
                command.ExecuteNonQuery();
                connection.Close();
                return 1;
            }
            catch (Exception e)
            {
                connection.Close();
                return 0;
            }
        }
Exemplo n.º 2
0
 public List<Reunion> getReuniones(Profesor profesor)
 {
     ProfesorTutor tutor = buscarTutor(profesor.Codigo);
     return tutor.ListaReunion;
 }
Exemplo n.º 3
0
 public List<Alumno> getAlumnos(Profesor profesor)
 {
     ProfesorTutor tutor = buscarTutor(profesor.Codigo);
     return tutor.ListaAlumno;
 }
Exemplo n.º 4
0
 public string agregarReunion(Alumno alumno, Profesor profesor, string fecha, string tema, string sugerencia)
 {
     Reunion reunion = new Reunion(alumno, profesor, fecha, tema, sugerencia);
     Alumno al = buscarAlumno(alumno.Codigo);
     ProfesorTutor prof = buscarTutor(profesor.Codigo);
     ReunionRepository.insertReunion(fecha, tema,sugerencia,alumno.Codigo,profesor.Codigo);
     al.ListaReuniones.Add(reunion);
     prof.ListaReunion.Add(reunion);
     return "Reunión Agregada";
 }
Exemplo n.º 5
0
 public string agregarProfesorTutor(Profesor profesor)
 {
     if (buscarTutor(profesor.Codigo) == null)
     {
         ProfesorTutor prof = new ProfesorTutor(profesor);
         ProfesorRepository.insertProfesor(profesor);
         tutores.Add(prof);
         return "Profesor agregado con éxito";
     }
     else
     {
         return "El profesor ya existe";
     }
 }
Exemplo n.º 6
0
 public Reunion(Alumno a, Profesor p, string t, string tem, string sug)
 {
     alumno = a;
     profesor = p;
     fecha = t;
     tema = tem;
     sugerencias = sug;
 }
Exemplo n.º 7
0
 public ProfesorTutor(Profesor profesor)
 {
     this.profesor = profesor;
 }
Exemplo n.º 8
0
 public ProfesorTutor(Profesor profesor)
 {
     this.profesor = profesor;
 }
Exemplo n.º 9
0
        public List <Reunion> getReuniones(Profesor profesor)
        {
            ProfesorTutor tutor = buscarTutor(profesor.Codigo);

            return(tutor.ListaReunion);
        }
Exemplo n.º 10
0
        public List <Alumno> getAlumnos(Profesor profesor)
        {
            ProfesorTutor tutor = buscarTutor(profesor.Codigo);

            return(tutor.ListaAlumno);
        }