Exemple #1
0
        protected void LinkLineAction(DataGridViewRow row)
        {
            if (row == null)
            {
                return;
            }

            if (_entity.EMedioPago != EMedioPago.CompensacionFactura)
            {
                if (_deallocated == 0)
                {
                    UnlinkLineAction(row);
                    return;
                }
            }

            CreditCardStatementInfo item = row.DataBoundItem as CreditCardStatementInfo;

            if (item == null)
            {
                return;
            }

            _entity.InsertNewTransactionPayment(item, _deallocated);

            UpdateAllocated();

            MarkAsUnlinked(row);
        }
Exemple #2
0
        protected override void MarkAsLinked(DataGridViewRow row)
        {
            CreditCardStatementInfo item = row.DataBoundItem as CreditCardStatementInfo;

            item.Vinculado = Library.Store.Resources.Labels.SET_PAGO;
            base.MarkAsLinked(row);
        }
        public static Payments GetByCreditCardStatement(long oidStatement, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CreditCardStatement = (oidStatement) != 0 ? CreditCardStatementInfo.New(oidStatement) : null,
                MedioPago           = EMedioPago.Tarjeta
            };

            return(GetList(Payment.SELECT_BY_CREDIT_CARD_STATEMENT(conditions, true), childs));
        }
Exemple #4
0
        protected override void LoadCreditCardStatements()
        {
            _statements = CreditCardStatementList.GetUnpaidList(_entity.OidTarjetaCredito, false);

            //Asociamos los gastos previamente vinculados
            foreach (TransactionPayment item in _entity.Operations)
            {
                CreditCardStatementInfo statement = _statements.GetItem(item.OidOperation);
                statement.Vincula();
            }

            base.LoadCreditCardStatements();
        }
Exemple #5
0
        protected void UnlinkLineAction(DataGridViewRow row)
        {
            if (row == null)
            {
                return;
            }

            CreditCardStatementInfo item = row.DataBoundItem as CreditCardStatementInfo;

            _entity.DeleteTransactionPayment(item);

            UpdateAllocated();

            MarkAsLinked(row);
        }
Exemple #6
0
        protected override void ViewCashLinesAction()
        {
            if (!ControlsMng.IsCurrentItemValid(Lines_DGW))
            {
                return;
            }

            CreditCardStatementInfo item = ControlsMng.GetCurrentItem(Lines_DGW) as CreditCardStatementInfo;

            CashLineList    list = CashLineList.GetByCreditCardStatement(item.Oid, false);
            CashLineMngForm form = new CashLineMngForm(true, _parent, list, 1);

            form.ViewMode      = molView.Enbebbed;
            form.Text          = String.Format("Disposiciones de efectivo de tarjeta {0}: {1} - {2})", _entity.TarjetaCredito, item.From.ToShortDateString(), item.Till.ToShortDateString());
            form.Width         = form.Width / 5 * 4;
            form.Height        = form.Height / 5 * 4;
            form.StartPosition = FormStartPosition.CenterScreen;

            FormMngBase.Instance.ShowFormulario(form, this);
        }
Exemple #7
0
        protected override void EditLineAllocationAction(DataGridViewRow row)
        {
            InputDecimalForm form = new InputDecimalForm();

            form.Message = Resources.Labels.IMPORTE_PAGO_GASTO;

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                CreditCardStatementInfo item = row.DataBoundItem as CreditCardStatementInfo;

                _deallocated += item.Asignado;

                _entity.EditTransactionPayment(item, form.Value);

                LinkLineAction(row);
                SetUnlinkedGridValues(Lines_DGW.Name);
                Lines_BS.ResetBindings(false);
                SetGridColors(Lines_DGW);
            }
        }
Exemple #8
0
        protected override void ViewStatementAction()
        {
            if (!ControlsMng.IsCurrentItemValid(Lines_DGW))
            {
                return;
            }

            CreditCardStatementInfo item = ControlsMng.GetCurrentItem(Lines_DGW) as CreditCardStatementInfo;

            PaymentList    list = PaymentList.GetByCreditCardStatement(item.Oid, false);
            PaymentMngForm form = new PaymentMngForm(true, _parent, ETipoPago.Todos, list);

            form.ViewMode      = molView.Enbebbed;
            form.Text          = String.Format("Extracto de tarjeta {0}: {1} - {2})", _entity.TarjetaCredito, item.From.ToShortDateString(), item.Till.ToShortDateString());
            form.Width         = form.Width / 5 * 4;
            form.Height        = form.Height / 5 * 4;
            form.StartPosition = FormStartPosition.CenterScreen;

            FormMngBase.Instance.ShowFormulario(form, this);

            form.FitColumns();
        }