コード例 #1
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result;
         this.Invoke((MethodInvoker) delegate
         {
             if (Convert.ToString(dgvRescision.SelectedRows[0].Cells[13].Value) == Util.EstadoInversion.Registrado)
             {
                 inversion.frmRescisionInversion frm = new inversion.frmRescisionInversion();
                 frm.frmParentName = this.Name;
                 frm.idRescision   = Convert.ToString(dgvRescision.SelectedRows[0].Cells[0].Value);
                 frm.idInversion   = Convert.ToString(dgvRescision.SelectedRows[0].Cells[1].Value);
                 frm.Evento        = GetEnum.Eventos.edit;
                 frm.mode          = frmBase.frmConfirmacionBase.Mode.modal;
                 result            = frm.ShowDialog(this);
                 frm.Close();
                 frm.Dispose();
             }
             else
             {
                 ucMsgBox1.ShowMessageWarnnig("Solo se puede editar rescisiones en estado Registrado");
             }
         });
     }
     catch (Exception ex)
     {
         ucMsgBox1.ShowMessageError("Error al cargar el detalle de la inversión - Error: " + ex.Message);
     }
 }
コード例 #2
0
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result;
         this.Invoke((MethodInvoker) delegate
         {
             inversion.frmRescisionInversion frm = new inversion.frmRescisionInversion();
             frm.frmParentName = this.Name;
             //frm.idInversion = idInversion;
             frm.Evento = GetEnum.Eventos.insert;
             frm.mode   = frmBase.frmConfirmacionBase.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);
     }
 }