コード例 #1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     actu = new ABMEstudios(new Estudio(), false);
     actu.Evento = "nuevo";
     actu.ShowDialog();
     if (actu.Estudio != null)
     {
         lista.Add(actu.Estudio);
         CargarGrilla();
     }
 }
コード例 #2
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (dgEstudios.SelectedRows.Count > 0)
     {
         Estudio est = lista.ElementAt<Estudio>(dgEstudios.CurrentRow.Index);
         actu = new ABMEstudios(est, true);
         actu.Evento = "eliminar";
         actu.ShowDialog();
         if (actu.Estudio != null)
         {
             lista[dgEstudios.CurrentRow.Index] = actu.Estudio;
         }
     }
     dgEstudios.Rows[0].Selected = true;
     CargarGrilla();
 }