Ejemplo n.º 1
0
        // 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 <CrudeBookingContactMethodModel> FetchWithFilter(System.Guid bookingContactMethodId, System.Guid bookingId, string contactMethodRcd, string contactMethodWay, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeBookingContactMethodModel>();
            List <CrudeBookingContactMethodData> dataList = CrudeBookingContactMethodData.FetchWithFilter(bookingContactMethodId, bookingId, contactMethodRcd, contactMethodWay, comment, userId, dateTime);

            foreach (CrudeBookingContactMethodData data in dataList)
            {
                var crudeBookingContactMethodBusinessModel = new CrudeBookingContactMethodModel();
                DataToModel(data, crudeBookingContactMethodBusinessModel);
                list.Add(crudeBookingContactMethodBusinessModel);
            }

            return(list);
        }
        // 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 <CrudeBookingContactMethodContract> FetchWithFilter(System.Guid bookingContactMethodId, System.Guid bookingId, string contactMethodRcd, string contactMethodWay, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeBookingContactMethodContract>();
            List <CrudeBookingContactMethodData> dataList = CrudeBookingContactMethodData.FetchWithFilter(
                bookingContactMethodId: bookingContactMethodId,
                bookingId: bookingId,
                contactMethodRcd: contactMethodRcd,
                contactMethodWay: contactMethodWay,
                comment: comment,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeBookingContactMethodData data in dataList)
            {
                var crudeBookingContactMethodContract = new CrudeBookingContactMethodContract();
                DataToContract(data, crudeBookingContactMethodContract);
                list.Add(crudeBookingContactMethodContract);
            }

            return(list);
        }