예제 #1
0
 /// <summary>
 /// Abre el formulario para editar item
 /// <returns>void</returns>
 /// </summary>
 public override void OpenEditForm()
 {
     try
     {
         DiscrepanciaInfo discrepancia = DiscrepanciaInfo.Get(ActiveOID);
         if (discrepancia == null)
         {
             return;
         }
         InformeDiscrepanciaInfo informe = InformeDiscrepanciaInfo.Get(discrepancia.OidInforme);
         AuditoriaEditForm       form    = new AuditoriaEditForm(informe.OidAuditoria);
         if (form.Entity != null)
         {
             AddForm(form);
         }
     }
     catch (Csla.DataPortalException ex)
     {
         MessageBox.Show(ex.BusinessException.ToString(),
                         moleQule.Face.Resources.Labels.ERROR_TITLE,
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(),
                         moleQule.Face.Resources.Labels.ERROR_TITLE,
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation);
     }
 }
예제 #2
0
 protected override void SetUnlinkedGridValues(string gridName)
 {
     switch (gridName)
     {
     case "Discrepancias_Grid":
     {
         foreach (DataGridViewRow row in Discrepancias_Grid.Rows)
         {
             if (row.IsNewRow)
             {
                 continue;
             }
             DiscrepanciaInfo info = (DiscrepanciaInfo)row.DataBoundItem;
             if (info != null)
             {
                 CuestionAuditoria cuestion = _auditoria.Cuestiones.GetItem(info.OidCuestion);
                 if (cuestion != null)
                 {
                     row.Cells["Cuestion"].Value = cuestion.Numero;
                 }
             }
         }
     } break;
     }
 }