예제 #1
0
 protected override void DocumentsAction()
 {
     try
     {
         AgenteEditForm form = new AgenteEditForm(typeof(Product), EntityInfo as IAgenteHipatia);
         form.ShowDialog(this);
     }
     catch (HipatiaException ex)
     {
         if (ex.Code == HipatiaCode.NO_AGENTE)
         {
             AgenteAddForm form = new AgenteAddForm(typeof(Product), EntityInfo as IAgenteHipatia);
             form.ShowDialog(this);
         }
     }
 }
 protected override void DocumentsAction()
 {
     try
     {
         AgenteEditForm form = new AgenteEditForm(typeof(Charge), Cobro as IAgenteHipatia);
         form.ShowDialog(this);
     }
     catch (HipatiaException ex)
     {
         if (ex.Code == HipatiaCode.NO_AGENTE)
         {
             AgenteAddForm form = new AgenteAddForm(typeof(Charge), Cobro as IAgenteHipatia);
             form.ShowDialog(this);
         }
         else
         {
             MessageBox.Show(ex.Message, moleQule.Face.Resources.Labels.ERROR_TITLE);
         }
     }
 }
        protected override void AdjuntarDocumentosFomentoAction()
        {
            if (Fomento_DGW.CurrentRow == null)
            {
                return;
            }

            LineaFomento item = (LineaFomento)Fomento_DGW.CurrentRow.DataBoundItem;

            try
            {
                AgenteEditForm form = new AgenteEditForm(typeof(LineaFomento), item as IAgenteHipatia, this);
                form.ShowDialog(this);
            }
            catch (HipatiaException ex)
            {
                if (ex.Code == HipatiaCode.NO_AGENTE)
                {
                    AgenteAddForm form = new AgenteAddForm(typeof(LineaFomento), item as IAgenteHipatia, this);
                    form.ShowDialog(this);
                }
            }
        }