示例#1
0
        protected virtual void EditClienteAction()
        {
            ClientEditForm form = new ClientEditForm(Entity, this);

            form.ShowDialog(this);

            _resumen.Refresh(Entity);
            Datos_Resumen.DataSource = _resumen;
            Datos_Resumen.ResetBindings(false);
        }
示例#2
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);
            }
        }
示例#3
0
        protected override void RefreshAction()
        {
            ChargeInfo current = Cobro;

            Cobros_DGW.Refresh();
            UpdateFacturasPendientes();
            UpdateFacturasCobro();

            Datos_Resumen.ResetBindings(false);

            SetGridColors(Cobros_DGW.Name);
            SetGridColors(LineasFomento_DGW.Name);

            Select(current);
        }
        protected override void RefreshAction()
        {
            Charge current = Cobro;

            _facturas_cliente       = OutputInvoiceList.GetByClienteList(_entity.Oid, false);
            Datos_Cobros.DataSource = _entity.Cobros.GetSortedList("IdCobro", ListSortDirection.Descending);
            Cobros_DGW.Refresh();
            UpdateFacturasPendientes();
            UpdateFacturasCobro();

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

            SetGridColors(Cobros_DGW.Name);
            SetGridColors(Facturas_DGW.Name);

            Select(current);
        }
示例#5
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);
        }
        protected void EditProveedorAction()
        {
            switch (Entity.ETipoAcreedor)
            {
            case ETipoAcreedor.Acreedor:
            case ETipoAcreedor.Proveedor:
            {
                ProveedorEditForm form = new ProveedorEditForm(Entity, this);
                form.ShowDialog();
            }
            break;

            case ETipoAcreedor.Despachante:
            {
                DespachanteEditForm form = new DespachanteEditForm(Entity, this);
                form.ShowDialog();
            }
            break;

            case ETipoAcreedor.Naviera:
            {
                NavieraEditForm form = new NavieraEditForm(Entity, this);
                form.ShowDialog();
            }
            break;

            case ETipoAcreedor.TransportistaDestino:
            case ETipoAcreedor.TransportistaOrigen:
            {
                TransporterEditForm form = new TransporterEditForm(Entity, this);
                form.ShowDialog();
            }
            break;
            }

            _summary.Refresh(Entity);
            Datos_Resumen.DataSource = _summary;
            Datos_Resumen.ResetBindings(false);
        }