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 <CrudeAircraftBodyRefModel> FetchWithFilter(string aircraftBodyRcd, string aircraftBodyName, string description, bool activeFlag, int sortOrder, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAircraftBodyRefModel>();
            List <CrudeAircraftBodyRefData> dataList = CrudeAircraftBodyRefData.FetchWithFilter(aircraftBodyRcd, aircraftBodyName, description, activeFlag, sortOrder, userId, dateTime);

            foreach (CrudeAircraftBodyRefData data in dataList)
            {
                var crudeAircraftBodyRefBusinessModel = new CrudeAircraftBodyRefModel();
                DataToModel(data, crudeAircraftBodyRefBusinessModel);
                list.Add(crudeAircraftBodyRefBusinessModel);
            }

            return(list);
        }
Ejemplo n.º 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 <CrudeAircraftBodyRefContract> FetchWithFilter(string aircraftBodyRcd, string aircraftBodyName, string description, bool activeFlag, int sortOrder, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAircraftBodyRefContract>();
            List <CrudeAircraftBodyRefData> dataList = CrudeAircraftBodyRefData.FetchWithFilter(
                aircraftBodyRcd: aircraftBodyRcd,
                aircraftBodyName: aircraftBodyName,
                description: description,
                activeFlag: activeFlag,
                sortOrder: sortOrder,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeAircraftBodyRefData data in dataList)
            {
                var crudeAircraftBodyRefContract = new CrudeAircraftBodyRefContract();
                DataToContract(data, crudeAircraftBodyRefContract);
                list.Add(crudeAircraftBodyRefContract);
            }

            return(list);
        }