Beispiel #1
0
        //获取实体
        public cloud_userequipment QueryObject(cloud_userequipment model)
        {
            IList <cloud_userequipment> list = cloud_userequipmentdal.getcloud_userequipmentList(model);

            if (list.Count > 0)
            {
                return(list[0]);
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
        //查询List
        public IList <cloud_userequipment> getcloud_userequipmentList(cloud_userequipment model)
        {
            IList <cloud_userequipment> list = new List <cloud_userequipment>();

            try
            {
                list = cloud_userequipmentdal.getcloud_userequipmentList(model);
            }
            catch
            {
                list = null;
            }
            return(list);
        }
Beispiel #3
0
        /// <summary>
        /// 返回总条数
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int GetRecordCount(cloud_userequipment model)
        {
            return(cloud_userequipmentdal.GetRecordCount(model));

            #region  缓存用法
            //int totalItems = 0;
            //object obj = CacheHelper.GetCache("cloud_userequipmentBLL_GetRecordCount"); //key一定要设置的有规律不重复类名+方法名
            //if (obj != null)
            //{
            //    totalItems = (int)obj;

            //}
            //else
            //{
            //    totalItems = cloud_userequipmentdal.GetRecordCount(model);
            //    CacheHelper.SetCacheAbsolute("cloud_userequipmentBLL_GetRecordCount", totalItems);//写入服务器缓存
            //}
            //return totalItems;
            #endregion
        }
Beispiel #4
0
        /// <summary>
        /// 获取DataTable列表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public DataTable getPageList(cloud_userequipment model)
        {
            return(cloud_userequipmentdal.getPageList(model));


            #region  缓存用法
            //DataTable dt = null;
            //object obj = CacheHelper.GetCache("cloud_userequipmentBLL_getPageList"); //key一定要设置的有规律不重复类名+方法名
            //if (obj != null)
            //{
            //    dt = (DataTable)obj;

            //}
            //else
            //{
            //    dt = cloud_userequipmentdal.getPageList(model);
            //    CacheHelper.SetCacheAbsolute("cloud_userequipmentBLL_getPageList", dt);//写入服务器缓存
            //}
            //return dt;
            #endregion
        }
Beispiel #5
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Update(cloud_userequipment model)
 {
     return(cloud_userequipmentdal.Update(model));
 }
Beispiel #6
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Insert(cloud_userequipment model)
 {
     return(cloud_userequipmentdal.Insert(model));
 }