Пример #1
0
 /// <summary>
 /// 获取单条数据
 /// </summary>
 /// <returns></returns>
 public LaboratoryTestItem Get(Expression <Func <HR_LABORATORYTESTITEM, bool> > predicate = null)
 {
     using (LaboratoryTestItemDAL dal = new LaboratoryTestItemDAL())
     {
         HR_LABORATORYTESTITEM entity = dal.Get(predicate);
         return(EntityToModel(entity));
     }
 }
Пример #2
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public IEnumerable <LaboratoryTestItem> GetList(PageInfo page)
        {
            using (LaboratoryTestItemDAL dal = new LaboratoryTestItemDAL())
            {
                var list = dal.Get();

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
Пример #3
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        public IEnumerable <LaboratoryTestItem> Get()
        {
            using (LaboratoryTestItemDAL dal = new LaboratoryTestItemDAL())
            {
                List <HR_LABORATORYTESTITEM> entitys = dal.Get().ToList();
                List <LaboratoryTestItem>    list    = new List <LaboratoryTestItem>();
                entitys.ForEach(e => list.Add(EntityToModel(e)));

                return(list);
            }
        }
Пример #4
0
        /// <summary>
        /// 根据实验室结果ID获取实验项
        /// </summary>
        /// <param name="resultId"></param>
        /// <returns></returns>
        public List <LaboratoryTestItem> GetListByRId(string resultId)
        {
            if (string.IsNullOrEmpty(resultId))
            {
                return(null);
            }
            using (LaboratoryTestItemDAL dal = new LaboratoryTestItemDAL())
            {
                IQueryable <HR_LABORATORYTESTITEM> entitys = dal.Get().Where(p => p.LABRESULTID == resultId).OrderBy("ORDERNUMBER");
                var list = entitys.Select(EntityToModel).ToList();

                return(list);
            }
        }