Example #1
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result;
         this.Invoke((MethodInvoker) delegate
         {
             if (Convert.ToString(dgvInversion.SelectedRows[0].Cells[10].Value) == Util.EstadoInversion.Registrado)
             {
                 inversion.frmInversion frm = new inversion.frmInversion();
                 frm.frmParentName          = this.Name;
                 //frm.idRescision = Convert.ToString(dgvInversion.SelectedRows[0].Cells[0].Value);
                 frm.idInversion = Convert.ToString(dgvInversion.SelectedRows[0].Cells[0].Value);
                 frm.Evento      = GetEnum.Eventos.edit;
                 frm.mode        = frmBase.frmRegistroBase.Mode.modal;
                 result          = frm.ShowDialog(this);
                 listInversion();
                 frm.Close();
                 frm.Dispose();
             }
             else
             {
                 ucMsgBox1.ShowMessageWarnnig("Solo se puede editar inversiones en estado Registrado");
             }
         });
     }
     catch (Exception ex)
     {
         ucMsgBox1.ShowMessageError("Error al cargar el detalle de la inversión - Error: " + ex.Message);
     }
 }
Example #2
0
 private void btnDetalle_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result;
         this.Invoke((MethodInvoker) delegate
         {
             inversion.frmInversion frm = new inversion.frmInversion();
             frm.frmParentName          = this.Name;
             frm.idInversion            = idInversion;
             frm.Evento = GetEnum.Eventos.view;
             frm.mode   = frmBase.frmRegistroBase.Mode.modal;
             result     = frm.ShowDialog(this);
             frm.Close();
             frm.Dispose();
         });
     }
     catch (Exception ex)
     {
         ucMsgBox1.ShowMessageError("Error al cargar el detalle de la inversión - Error: " + ex.Message);
     }
 }