Пример #1
0
        protected void ChangeState(moleQule.Base.EEstado estado)
        {
            if (Pago == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

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

            switch (estado)
            {
            case moleQule.Base.EEstado.Anulado:
            {
                if (Pago.EEstado == moleQule.Base.EEstado.Contabilizado)
                {
                    PgMng.ShowInfoException(moleQule.Common.Resources.Messages.NULL_CONTABILIZADO_NOT_ALLOWED);
                    return;
                }

                if (ProgressInfoMng.ShowQuestion(Face.Resources.Messages.NULL_CONFIRM) != DialogResult.Yes)
                {
                    return;
                }
            }
            break;
            }

            try
            {
                _entity.Pagos.ChangeState(estado, Pago, _entity);
                _entity.ApplyEdit();
                _entity.ISave(Pago);
                _entity.BeginEdit();

                Payment current = Pago;
                Datos_Pago.ResetBindings(false);
                _summary.Refresh(_entity);
                Datos_Resumen.ResetBindings(false);
                SetGridColors(Pagos_DGW.Name);
                _invoices = InputInvoiceList.GetListByAcreedor(_entity.Oid, _entity.ETipoAcreedor, false);
                Select(current);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
            }
        }
Пример #2
0
        protected override void RefreshMainData()
        {
            _invoices = InputInvoiceList.GetListByAcreedor(_entity.Oid, _entity.ETipoAcreedor, false);
            PgMng.Grow();

            Datos.DataSource = _entity;
            PgMng.Grow();

            _entity.LoadChilds(typeof(Payment), true);
            Datos_Pago.DataSource = _entity.Pagos;
            PgMng.Grow();

            Datos_Resumen.DataSource = _summary;

            base.RefreshMainData();
        }
Пример #3
0
        protected override void RefreshAction()
        {
            Payment current = Pago;

            _entity.LoadChilds(typeof(Payment), true);

            Datos_Pago.DataSource = _entity.Pagos.GetSortedList("IdPago", ListSortDirection.Descending);
            Pagos_DGW.Refresh();
            Datos_Pago.ResetBindings(true);

            _invoices = InputInvoiceList.GetListByAcreedor(_entity.Oid, _entity.ETipoAcreedor, false);
            UpdatePendientes();

            _summary.Refresh(_entity);
            Datos_Resumen.ResetBindings(false);

            SetGridColors(Pagos_DGW.Name);

            Select(current);
        }