Пример #1
0
        protected override void GetFormSourceData(object[] parameters)
        {
            if (parameters[0] == null)
            {
                _entity = Payment.New((ETipoPago)parameters[1]);
                _entity.BeginEdit();
                _entity.Oid = -1;
            }
            else
            {
                _entity = (Payment)parameters[0];
                _entity.BeginEdit();
                _entity.Oid = -1;
            }

            _gastos = ExpenseList.GetPendientesList(moleQule.Store.Structs.EnumConvert.ToECategoriaGasto(_entity.ETipoPago), _entity.GetInfo(false), false);

            //Asociamos los gastos previamente vinculados
            foreach (TransactionPayment item in _entity.Operations)
            {
                ExpenseInfo gasto = _gastos.GetItem(item.OidOperation);
                gasto.Vincula();
            }
        }