Example #1
0
        private void ButtonNuevo_Click(object sender, EventArgs e)
        {
            FrmPersonaEdicion alta = new FrmPersonaEdicion(oPersonaService, FrmPersonaEdicion.ABMFormMode.insert);

            alta.ShowDialog();
            dgvPersonas.Rows.Clear();
        }
Example #2
0
 private void ButtonModificar_Click(object sender, EventArgs e)
 {
     if (dgvPersonas.CurrentRow == null)
     {
         MessageBox.Show("Seleccione un registro");
     }
     else
     {
         oPersonaService.IdPersonaSeleccionada = Int32.Parse(dgvPersonas.CurrentRow.Cells["IdPersona"].Value.ToString());
         FrmPersonaEdicion alta = new FrmPersonaEdicion(oPersonaService, FrmPersonaEdicion.ABMFormMode.update);
         alta.ShowDialog();
         dgvPersonas.Rows.Clear();
     }
 }