protected override void tsbNuevo_Click(object sender, EventArgs e)
        {
            DocenteDesktop formPersona = new DocenteDesktop(ApplicationForm.ModoForm.Alta);

            formPersona.ShowDialog();
            this.Listar();
        }
Beispiel #2
0
 public void AltaPersona()
 {
     DocenteDesktop formDocente = new DocenteDesktop(ApplicationForm.ModoForm.Alta);
     formDocente.btnAceptar.Text = "Guardar";
     formDocente.txtID.Enabled = false;
     formDocente.ShowDialog();
 }
 protected override void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPersonas.SelectedRows.Count > 0)
     {
         int            ID          = ((Business.Entities.Persona) this.dgvPersonas.SelectedRows[0].DataBoundItem).ID;
         DocenteDesktop formPersona = new DocenteDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPersona.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccione un docente", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #4
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     int ID;
     if (this.dgvDocentes.SelectedRows != null && this.dgvDocentes.SelectedRows.Count == 1)
     {
         ID = ((Persona)this.dgvDocentes.SelectedRows[0].DataBoundItem).ID;
         DocenteDesktop formDocente = new DocenteDesktop(ID, ApplicationForm.ModoForm.Baja);
         formDocente.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccione una fila para eliminar!", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #5
0
 private void btnAceptar_Click(object sender, EventArgs e)
 {
     if (Validar())
     {
         if (comboTipoPersona.SelectedIndex == (int)Persona.TiposPersonas.Alumno)
         {
             AlumnoDesktop alu = new AlumnoDesktop(ApplicationForm.ModoForm.Alta);
             alu.btnAceptar.Text = "Guardar";
             alu.ShowDialog();
             this.Close();
         }
         else if (comboTipoPersona.SelectedIndex == (int)Persona.TiposPersonas.Docente)
         {
             DocenteDesktop doc = new DocenteDesktop(ApplicationForm.ModoForm.Alta);
             doc.btnAceptar.Text = "Guardar";
             doc.ShowDialog();
             this.Close();
         }
     }
 }
Beispiel #6
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     DocenteDesktop formDocente = new DocenteDesktop(ApplicationForm.ModoForm.Alta);
     formDocente.btnAceptar.Text = "Guardar";
     formDocente.txtID.Enabled = false;
     formDocente.ShowDialog();
     this.Listar();
 }