Example #1
0
        public override void OpenEditForm()
        {
            switch (ActiveItem.ETipoCobro)
            {
            case ETipoCobro.Cliente:
            {
                ChargeSummary item = ChargeSummary.GetByCliente(ActiveItem.OidCliente);
                CobroEditForm form = new CobroEditForm(ActiveItem.OidCliente, item, ActiveItem, this);

                if (form.Entity != null)
                {
                    form.Select(ActiveItem);
                    AddForm(form);
                }
            }
            break;

            case ETipoCobro.REA:
            {
                try
                {
                    Library.Common.EntityBase.CheckEditAllowedEstado(ActiveItem.EEstado, EEstado.Abierto);
                }
                catch (iQException ex)
                {
                    PgMng.ShowInfoException(ex);
                    _action_result = DialogResult.Ignore;
                    return;
                }

                REAChargeEditForm form = new REAChargeEditForm(ActiveOID, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                }
            }
            break;

            case ETipoCobro.Fomento:
            {
                try
                {
                    Library.Common.EntityBase.CheckEditAllowedEstado(ActiveItem.EEstado, EEstado.Abierto);
                }
                catch (iQException ex)
                {
                    PgMng.ShowInfoException(ex);
                    _action_result = DialogResult.Ignore;
                    return;
                }

                CobroFomentoEditForm form = new CobroFomentoEditForm(ActiveOID, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                }
            }
            break;
            }
        }
        public override void OpenEditForm()
        {
            try
            {
                Library.Common.EntityBase.CheckEditAllowedEstado(ActiveItem.EEstado, EEstado.Abierto);
            }
            catch (iQException ex)
            {
                PgMng.ShowInfoException(ex);
                _action_result = DialogResult.Ignore;
                return;
            }
            REAChargeEditForm form = new REAChargeEditForm(ActiveItem.Oid, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity = form.Entity;
            }
        }
Example #3
0
        protected override void EditCobroAction()
        {
            if (Cobro == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

            if (Cobro.EEstado == EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            REAChargeEditForm form = new REAChargeEditForm(Cobro.Oid, this);

            form.ShowDialog(this);

            RefreshAction();
        }