private void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                CargaDatosActuales();
                switch (tabRecursos.SelectedTabPage.Name)
                {
                case "tpDetalles":
                    using (var frm = new frmDetalleRecurso(m_DetalleSeleccionado))
                    {
                        if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            m_DetalleSeleccionado = frm.m_RecursoDetalle;
                            detallesBindingSource.ResetBindings(false);
                        }
                    }
                    break;

                case "tpRecursos":
                    using (var frm = new frmRecursosAnidados(m_Seleccionado))
                    {
                        if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            m_Seleccionado = frm.m_RecursoHijo;
                            listaRecursosBindingSource.ResetBindings(false);
                        }
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Ejemplo n.º 2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         CargaDatosActuales();
         using (var frm = new frmDetalleRecurso(m_Seleccionado))
         {
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 m_Seleccionado = frm.m_RecursoDetalle;
                 detallesBindingSource.ResetBindings(false);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
Ejemplo n.º 3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         CargaDatosActuales();
         switch (tabRecursos.SelectedTabPage.Name)
         {
             case "tpDetalles":
                 using (var frm = new frmDetalleRecurso(m_RecursoDetalle))
                 {
                     if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                     {
                         m_RecursoDetalle = frm.m_RecursoDetalle;
                         detallesBindingSource.ResetBindings(false);
                     }
                 }
                 break;
             case "tpRecursosAnidados":
                 using (var frm = new frmRecursosAnidados(m_RecursoHijo))
                 {
                     if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                         listaRecursosBindingSource.ResetBindings(false);
                 }
                 break;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         CargaDatosActuales();
         using (var frm = new frmDetalleRecurso(m_Seleccionado))
         {
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 m_Seleccionado = frm.m_RecursoDetalle;
                 detallesBindingSource.ResetBindings(false);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }