// fetch all from table into new List of class instances, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/db27658d-4d23-46d7-9970-7bbaef8634b0
        public List <CrudeFinancialPaymentCouponModel> FetchWithFilter(System.Guid financialPaymentCouponId, decimal amount, System.Guid financialCurrencyId, System.Guid financialCouponId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFinancialPaymentCouponModel>();
            List <CrudeFinancialPaymentCouponData> dataList = CrudeFinancialPaymentCouponData.FetchWithFilter(financialPaymentCouponId, amount, financialCurrencyId, financialCouponId, userId, dateTime);

            foreach (CrudeFinancialPaymentCouponData data in dataList)
            {
                var crudeFinancialPaymentCouponBusinessModel = new CrudeFinancialPaymentCouponModel();
                DataToModel(data, crudeFinancialPaymentCouponBusinessModel);
                list.Add(crudeFinancialPaymentCouponBusinessModel);
            }

            return(list);
        }
示例#2
0
        // fetch all rows from table into new List of Contracts, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/ce01ef4a-5cd0-4e51-b211-9c0a15b791a0
        public List <CrudeFinancialPaymentCouponContract> FetchWithFilter(System.Guid financialPaymentCouponId, decimal amount, System.Guid financialCurrencyId, System.Guid financialCouponId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFinancialPaymentCouponContract>();
            List <CrudeFinancialPaymentCouponData> dataList = CrudeFinancialPaymentCouponData.FetchWithFilter(
                financialPaymentCouponId: financialPaymentCouponId,
                amount: amount,
                financialCurrencyId: financialCurrencyId,
                financialCouponId: financialCouponId,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeFinancialPaymentCouponData data in dataList)
            {
                var crudeFinancialPaymentCouponContract = new CrudeFinancialPaymentCouponContract();
                DataToContract(data, crudeFinancialPaymentCouponContract);
                list.Add(crudeFinancialPaymentCouponContract);
            }

            return(list);
        }