Exemplo 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 <CrudeDateTimeTypeRefModel> FetchWithFilter(string dateTimeTypeRcd, string dateTimeTypeName, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeDateTimeTypeRefModel>();
            List <CrudeDateTimeTypeRefData> dataList = CrudeDateTimeTypeRefData.FetchWithFilter(dateTimeTypeRcd, dateTimeTypeName, userId, dateTime);

            foreach (CrudeDateTimeTypeRefData data in dataList)
            {
                var crudeDateTimeTypeRefBusinessModel = new CrudeDateTimeTypeRefModel();
                DataToModel(data, crudeDateTimeTypeRefBusinessModel);
                list.Add(crudeDateTimeTypeRefBusinessModel);
            }

            return(list);
        }
Exemplo 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 <CrudeDateTimeTypeRefContract> FetchWithFilter(string dateTimeTypeRcd, string dateTimeTypeName, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeDateTimeTypeRefContract>();
            List <CrudeDateTimeTypeRefData> dataList = CrudeDateTimeTypeRefData.FetchWithFilter(
                dateTimeTypeRcd: dateTimeTypeRcd,
                dateTimeTypeName: dateTimeTypeName,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeDateTimeTypeRefData data in dataList)
            {
                var crudeDateTimeTypeRefContract = new CrudeDateTimeTypeRefContract();
                DataToContract(data, crudeDateTimeTypeRefContract);
                list.Add(crudeDateTimeTypeRefContract);
            }

            return(list);
        }