Exemple #1
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 <CrudeFinancialPaymentContract> FetchWithFilter(System.Guid financialPaymentId, string financialPaymentTypeRcd, System.Guid financialPaymentCardId, System.Guid financialPaymentCashId, System.Guid financialPaymentVoucherId, System.Guid financialPaymentCouponId, System.Guid financialPaymentBankId, System.Guid financialPaymentAccountingId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFinancialPaymentContract>();
            List <CrudeFinancialPaymentData> dataList = CrudeFinancialPaymentData.FetchWithFilter(
                financialPaymentId: financialPaymentId,
                financialPaymentTypeRcd: financialPaymentTypeRcd,
                financialPaymentCardId: financialPaymentCardId,
                financialPaymentCashId: financialPaymentCashId,
                financialPaymentVoucherId: financialPaymentVoucherId,
                financialPaymentCouponId: financialPaymentCouponId,
                financialPaymentBankId: financialPaymentBankId,
                financialPaymentAccountingId: financialPaymentAccountingId,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeFinancialPaymentData data in dataList)
            {
                var crudeFinancialPaymentContract = new CrudeFinancialPaymentContract();
                DataToContract(data, crudeFinancialPaymentContract);
                list.Add(crudeFinancialPaymentContract);
            }

            return(list);
        }