public void CreditCardStatementListLoadPayments() { CreditCardStatementList list = null; list = CreditCardStatementList.GetList(2014, false); Assert.IsTrue(list.Count > 0); PaymentList payments = PaymentList.GetByCreditCardStatement(list[0].Oid, false); Assert.IsTrue(payments.Count > 0); Assert.IsNull(payments.FirstOrDefault(x => x.OidLink != list[0].Oid)); Assert.IsNull(payments.FirstOrDefault(x => x.OidTarjetaCredito != list[0].OidCreditCard)); Assert.IsNull(payments.FirstOrDefault(x => x.Vencimiento < list[0].From)); Assert.IsNull(payments.FirstOrDefault(x => x.Vencimiento > list[0].DueDate)); }
protected override void OpenMngFormAction(NotifyEntity item) { switch (item.ETipoEntidad) { case ETipoEntidad.Pago: case ETipoEntidad.CreditCardStatement: { if (item.List == null) { item.List = PaymentList.GetByCreditCardStatement(item.Oid, false); SetTotales(); } PaymentMngForm form = new PaymentMngForm(false, _parent, ETipoPago.Todos, (PaymentList)item.List); FormMngBase.Instance.ShowFormulario(form, this); form.ViewMode = molView.Enbebbed; form.Text = item.Title; form.Left = this.Right + 1; form.Width -= this.Width; form.FitColumns(); } break; case ETipoEntidad.Caja: { if (item.List == null) { item.List = CashLineList.GetByCreditCardStatement(item.Oid, false); SetTotales(); } CashLineMngForm form = new CashLineMngForm(false, _parent, (CashLineList)item.List, 1); form.ViewMode = molView.Enbebbed; FormMngBase.Instance.ShowFormulario(form, this); form.Text = item.Title; form.Left = this.Right + 1; form.Width -= this.Width; form.FitColumns(); } break; } }
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(); }