Beispiel #1
0
 /// <summary>
 /// 获取单条数据
 /// </summary>
 /// <returns></returns>
 public V_ctms_hr_company Get(Expression <Func <ctms_hr_company, bool> > predicate = null)
 {
     using (ctms_hr_companyDAL dal = new ctms_hr_companyDAL()){
         ctms_hr_company entity = dal.Get(predicate);
         return(EntityToModel(entity));
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public IEnumerable <V_ctms_hr_company> GetList(PageInfo page)
        {
            using (ctms_hr_companyDAL dal = new ctms_hr_companyDAL()){
                var list = dal.Get();

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
Beispiel #3
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public IEnumerable <V_ctms_hr_company> Get()
 {
     using (ctms_hr_companyDAL dal = new ctms_hr_companyDAL()){
         List <ctms_hr_company>   entitys = dal.Get().ToList();
         List <V_ctms_hr_company> list    = new List <V_ctms_hr_company>();
         foreach (ctms_hr_company item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }