Beispiel #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);
     }
 }
Beispiel #2
0
 public InformeDiscrepanciaViewForm(InformeDiscrepancia entity, Auditoria auditoria, Form parent)
     : base(entity.Oid, true, parent)
 {
     InitializeComponent();
     _entity    = entity.GetInfo(true);
     _auditoria = auditoria;
     if (EntityInfo != null)
     {
         SetFormData();
         this.Text = Resources.Labels.INFORME_DISCREPANCIA_TITLE + " " + EntityInfo.Codigo.ToUpper();
     }
     _mf_type = ManagerFormType.MFView;
 }