Example #1
0
        private void tsNuevo_Click(object sender, EventArgs e)
        {
            PlanABM formPlanes = new PlanABM();

            formPlanes.Modo = ApplicationForm.ModoForm.Alta;
            formPlanes.ShowDialog();
            this.Listar();
        }
Example #2
0
 private void tsEliminar_Click(object sender, EventArgs e)
 {
     /*
      * int ID = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
      * PlanDesktop formPlanes = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
      * formPlanes.ShowDialog();
      */
     if (itemSeleccionado())
     {
         PlanABM formUsuario = new PlanABM();
         formUsuario.Modo       = ApplicationForm.ModoForm.Baja;
         formUsuario.PlanActual = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem);
         formUsuario.ShowDialog();
         Listar();
     }
     else
     {
         MessageBox.Show("No hay planes seleccionados", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }