Beispiel #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 <CrudeBookingEventModel> FetchWithFilter(System.Guid bookingEventId, System.Guid bookingId, string bookingEventTypeRcd, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeBookingEventModel>();
            List <CrudeBookingEventData> dataList = CrudeBookingEventData.FetchWithFilter(bookingEventId, bookingId, bookingEventTypeRcd, comment, userId, dateTime);

            foreach (CrudeBookingEventData data in dataList)
            {
                var crudeBookingEventBusinessModel = new CrudeBookingEventModel();
                DataToModel(data, crudeBookingEventBusinessModel);
                list.Add(crudeBookingEventBusinessModel);
            }

            return(list);
        }
Beispiel #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 <CrudeBookingEventContract> FetchWithFilter(System.Guid bookingEventId, System.Guid bookingId, string bookingEventTypeRcd, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeBookingEventContract>();
            List <CrudeBookingEventData> dataList = CrudeBookingEventData.FetchWithFilter(
                bookingEventId: bookingEventId,
                bookingId: bookingId,
                bookingEventTypeRcd: bookingEventTypeRcd,
                comment: comment,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeBookingEventData data in dataList)
            {
                var crudeBookingEventContract = new CrudeBookingEventContract();
                DataToContract(data, crudeBookingEventContract);
                list.Add(crudeBookingEventContract);
            }

            return(list);
        }