Exemple #1
0
        public void modificarProfesor(object sender, EventArgs e)// este metod esta incompleto llegue a implemntarlo pero tuve un problema al trata de elegir si era
        //contratado u ordinario ya que esta informacion no estaba en la clase padre profesor
        {
            Practica2.ServiceReference5.Service2Client serviceTutor = new Practica2.ServiceReference5.Service2Client();
            int           codigoProfesor       = extraerCodigo(this.treeView1.SelectedNode.Text);
            ProfesorTutor profesorSeleccionado = serviceTutor.buscarTutor(codigoProfesor);

            Form2 formularioProfesor = new Form2(ref profesorSeleccionado);

            formularioProfesor.ShowDialog(this);
        }
Exemple #2
0
        public Form2(ref ProfesorTutor seleccionado)
        {
            InitializeComponent();
            this.Text         = "Modificar Profesor";
            this.button1.Text = "Guardar";

            textBoxCodigo.Text              = seleccionado.Profesor.Codigo.ToString();
            textBoxNombre.Text              = seleccionado.Profesor.Nombre;
            textBoxDNI.Text                 = seleccionado.Profesor.Dni.ToString();
            textBoxCorreo.Text              = seleccionado.Profesor.Correo;
            textBoxTelefono.Text            = seleccionado.Profesor.Telefono.ToString();
            comboBoxIdioma.SelectedIndex    = seleccionado.Profesor.Idioma;
            comboBoxDedicacion.SelectedText = seleccionado.Profesor.RegimenDedicacion;
            // dateTimePickerInicio.Value = new DateTime(seleccionado.Profesor.Inicio);
        }
Exemple #3
0
        public Form2(ref ProfesorTutor seleccionado)
        {
            InitializeComponent();
            this.Text = "Modificar Profesor";
            this.button1.Text = "Guardar";

            textBoxCodigo.Text = seleccionado.Profesor.Codigo.ToString();
            textBoxNombre.Text = seleccionado.Profesor.Nombre;
            textBoxDNI.Text = seleccionado.Profesor.Dni.ToString();
            textBoxCorreo.Text = seleccionado.Profesor.Correo;
            textBoxTelefono.Text = seleccionado.Profesor.Telefono.ToString();
            comboBoxIdioma.SelectedIndex = seleccionado.Profesor.Idioma;
            comboBoxDedicacion.SelectedText = seleccionado.Profesor.RegimenDedicacion;
               // dateTimePickerInicio.Value = new DateTime(seleccionado.Profesor.Inicio);
        }
Exemple #4
0
        private void agregarProfesor(object sender, EventArgs e) // #pregunta6 codigo para agregar profesor
        {
            Practica2.ServiceReference5.Service2Client serviceTutor = new Practica2.ServiceReference5.Service2Client();
            //Profesor profesor;
            Form2 formularioProfesor = new Form2(/*ref profesor*/);

            formularioProfesor.ShowDialog(this);
            if (Form2.ProfesorAgregado != null)
            {
                ProfesorTutor newProfesor = new ProfesorTutor();

                serviceTutor.agregarProfesorTutor(Form2.ProfesorAgregado);


                cargarArbol();
            }
        }
Exemple #5
0
        private void Ventana_Paint(object sender, PaintEventArgs e)
        {
            decimal[] valores = new decimal[10];
            int       i       = 0;


            int total = (serviceTutor.getTutoresCount() >= 10) ? 10 : serviceTutor.getTutoresCount();

            //GestorTutores.Tutores.Sort((x, y) => y.cantidadReuniones().CompareTo(x.cantidadReuniones()));
            this.dataGridView1.Rows.Clear();
            string[] colores =
            {
                "Amarillo",
                "Verde",
                "Azul",
                "Turquesa",
                "Magenta",
                "Rojo",
                "Negro",
                "Plomo",
                "Marron",
                "Celeste"
            };
            for (int x = 0; x < total; x++)
            {
                int           codigoTutor = serviceTutor.getProfesorTutor(x);
                ProfesorTutor selected    = serviceTutor.buscarTutor(codigoTutor);
                valores[x] = selected.ListaReunion.Length;

                this.dataGridView1.Rows.Add(selected.Codigo, selected.Profesor.Nombre, valores[x], colores[x]);
            }

            Bitmap pie = Draw(Color.White, 300, 300, valores);

            e.Graphics.DrawImage(pie, 100, 20);
        }
Exemple #6
0
        // #pregunta6 codigo para agregar profesor
        private void agregarProfesor(object sender, EventArgs e)
        {
            Practica2.ServiceReference5.Service2Client serviceTutor = new Practica2.ServiceReference5.Service2Client();
            //Profesor profesor;
            Form2 formularioProfesor = new Form2(/*ref profesor*/);
            formularioProfesor.ShowDialog(this);
            if (Form2.ProfesorAgregado != null)
            {
                ProfesorTutor newProfesor = new ProfesorTutor();

                serviceTutor.agregarProfesorTutor(Form2.ProfesorAgregado);

                cargarArbol();
            }
        }