Exemplo n.º 1
0
 /// <summary>
 /// 根据主键获取一个ClassesFound实体记录。
 /// 该方法提供给其他实体的业务逻辑层(Logic)方法调用
 /// </summary>
 /// <returns>ClassesFound实体</returns>
 /// <param name="columns">要返回的列</param>
 public ClassesFoundEntity GetClassesFound(int id, bool iscache = false)
 {
     if (iscache)
     {
         string             _cachekey = "ClassesFound_" + id.ToString();// SysCacheKey.ClassesFoundListKey;
         object             _objcache = MemCache.GetCache(_cachekey);
         ClassesFoundEntity _obj      = new ClassesFoundEntity();
         if (_objcache == null)
         {
             _obj = ClassesFoundDA.Instance.GetClassesFound(id);
             MemCache.AddCache(_cachekey, _obj);
         }
         else
         {
             _obj = (ClassesFoundEntity)_objcache;
         }
         return(_obj);
     }
     else if (iscache == false)
     {
         return(ClassesFoundDA.Instance.GetClassesFound(id));
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 2
0
        public VWShowStoreEntity GetNextStore(int preid)
        {
            VWShowStoreEntity entity = new VWShowStoreEntity();

            if (preid > 0)
            {
                string _cachekey = "GetNextStore_" + preid;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    entity = MemStoreDA.Instance.GetNextStore(preid);
                    MemCache.AddCache(_cachekey, entity);
                }
                else
                {
                    entity = (VWShowStoreEntity)obj;
                }
            }
            else
            {
                entity = MemStoreDA.Instance.GetNextStore(preid);
            }

            return(entity);
        }
Exemplo n.º 3
0
        public IList <MemCGScopeEntity> GetMemCGScopeAllByMemId(int memid, bool cache = false)
        {
            IList <MemCGScopeEntity> list = null;

            if (cache)
            {
                string _cachekey = "GetMemCGScopeAllByMemId_" + memid;// SysCacheKey.MemCGScopeListKey;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = MemCGScopeDA.Instance.GetMemCGScopeAllByMemId(memid);
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <MemCGScopeEntity>)obj;
                }
            }
            else
            {
                list = MemCGScopeDA.Instance.GetMemCGScopeAllByMemId(memid);
            }

            return(list);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 根据主键获取一个DicUnitEnum实体记录。
        /// 该方法提供给其他实体的业务逻辑层(Logic)方法调用
        /// </summary>
        /// <returns>DicUnitEnum实体</returns>
        /// <param name="columns">要返回的列</param>
        public DicUnitEnumEntity GetDicUnitEnum(int id, bool iscache = false)
        {
            DicUnitEnumEntity entity = new DicUnitEnumEntity();

            if (!iscache)
            {
                entity = DicUnitEnumDA.Instance.GetDicUnitEnum(id);
            }
            else
            {
                string _cachekey = "GetDicUnitEnum" + id;// SysCacheKey.DicUnitEnumListKey;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    entity = DicUnitEnumDA.Instance.GetDicUnitEnum(id);
                    MemCache.AddCache(_cachekey, entity);
                }
                else
                {
                    entity = (DicUnitEnumEntity)obj;
                }
            }

            return(entity);
        }
        /// <summary>
        /// 广告位显示专区数据获取
        /// </summary>
        /// <param name="specialid"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public IList <VWProductSpecialDetailsEntity> GetSpecialDetailsForMenuAD(int specialid, int num = 8)
        {
            IList <VWProductSpecialDetailsEntity> list = null;
            string _cachekey = "GetSpecialDetailsForMenuAD_" + specialid + "_" + num;
            object obj       = MemCache.GetCache(_cachekey);

            if (obj == null)
            {
                list = ProductSpecialDetailsDA.Instance.GetSpecialDetailsForMenuAD(specialid, num);
                if (list != null && list.Count > 0)
                {
                    foreach (VWProductSpecialDetailsEntity entity in list)
                    {
                        entity.ProductDetail = ProductBLL.Instance.GetProVWByDetailId(entity.ProductDetailId);
                    }
                }
                MemCache.AddCache(_cachekey, list);
            }
            else
            {
                list = (IList <VWProductSpecialDetailsEntity>)obj;
            }

            return(list);
        }
Exemplo n.º 6
0
 /// <summary>
 /// 根据主键获取一个Brand实体记录。
 /// 该方法提供给其他实体的业务逻辑层(Logic)方法调用
 /// </summary>
 /// <returns>Brand实体</returns>
 /// <param name="columns">要返回的列</param>
 public BrandEntity GetBrand(int id, bool iscache = false)
 {
     if (iscache)
     {
         string      _cachekey = "Brand_" + id.ToString();
         object      _objcache = MemCache.GetCache(_cachekey);
         BrandEntity _obj      = new BrandEntity();
         if (_objcache == null)
         {
             _obj = BrandDA.Instance.GetBrand(id);
             MemCache.AddCache(_cachekey, _obj);
         }
         else
         {
             _obj = (BrandEntity)_objcache;
         }
         return(_obj);
     }
     else if (iscache == false)
     {
         return(BrandDA.Instance.GetBrand(id));
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 7
0
        ///// <summary>
        ///// 获得数据列表
        ///// </summary>
        public IList <VWProductBaoPinEntity> GetProductBaoPinList(int pageIndex, int pageSize, ref int recordCount, int isactive, int showproduct)
        {
            IList <VWProductBaoPinEntity> list = null;
            string _cachekey    = "GetProductBaoPinList_" + pageIndex + "_" + pageSize + "_" + isactive + showproduct;
            string _cachekeynum = "GetProductBaoPinListNum_" + pageIndex + "_" + pageSize + "_" + isactive + showproduct;
            object obj          = MemCache.GetCache(_cachekey);

            if (obj == null)
            {
                list = ProductBaoPinDA.Instance.GetProductBaoPinList(pageSize, pageIndex, ref recordCount, isactive, showproduct);
                foreach (VWProductBaoPinEntity entity in list)
                {
                    if (entity.ProductDetailId > 0)
                    {
                        entity.ProductDetail = ProductBLL.Instance.GetProVWByDetailId(entity.ProductDetailId);
                        entity.ProductId     = entity.ProductDetail.ProductId;
                        if (entity.ProductDetail.BrandId > 0)
                        {
                            entity.Brand = BrandBLL.Instance.GetBrand(entity.ProductDetail.BrandId);
                        }
                    }
                }
                MemCache.AddCache(_cachekey, list);
                MemCache.AddCache(_cachekeynum, recordCount);
            }
            else
            {
                list        = (IList <VWProductBaoPinEntity>)obj;
                recordCount = StringUtils.GetDbInt(MemCache.GetCache(_cachekeynum));
            }
            return(list);
        }
Exemplo n.º 8
0
        public IList <CarTypeModelEntity> GetCarTypeModelAll(int seriesid, bool cache = false)
        {
            IList <CarTypeModelEntity> list = null;

            if (cache)
            {
                string _cachekey = "GetCarTypeModelAll_" + seriesid;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = CarTypeModelDA.Instance.GetCarTypeModelAll(seriesid);
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <CarTypeModelEntity>)obj;
                }
            }
            else
            {
                list = CarTypeModelDA.Instance.GetCarTypeModelAll(seriesid);
            }

            return(list);
        }
Exemplo n.º 9
0
 public IList <ClassesFoundEntity> GetClassesAllByBrandId(int siteid, int brandid, bool iscache)
 {
     if (iscache == false)
     {
         string _cachekey = "GetClassesAllByBrandId_" + siteid + "_" + brandid;
         object obj       = MemCache.GetCache(_cachekey);
         IList <ClassesFoundEntity> list = null;
         if (obj == null)
         {
             list = ClassesFoundDA.Instance.GetClassesAllByBrandId(siteid, brandid);
             MemCache.AddCache(_cachekey, list);
         }
         else
         {
             list = (IList <ClassesFoundEntity>)obj;
         }
         return(list);
     }
     else
     {
         IList <ClassesFoundEntity> list = null;
         list = ClassesFoundDA.Instance.GetClassesAllByBrandId(siteid, brandid);
         return(list);
     }
 }
Exemplo n.º 10
0
        public string   GetNickNameByMemId(int memid, bool iscache = false)
        {
            string nickname = "";

            if (iscache)
            {
                string _cachekey = "GetNickNameByMemId" + memid;// SysCacheKey.MemberInfoListKey;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    MemberInfoEntity entity = null;
                    entity   = MemberInfoDA.Instance.GetMemberInfoByMemId(memid);
                    nickname = entity.Nickname;
                    MemCache.AddCache(_cachekey, nickname);
                }
                else
                {
                    nickname = obj.ToString();
                }
            }
            else
            {
                MemberInfoEntity entity = null;
                entity   = MemberInfoDA.Instance.GetMemberInfoByMemId(memid);
                nickname = entity.Nickname;
            }

            return(nickname);
        }
Exemplo n.º 11
0
        public IList <VWTreeCTSeriesEntity> GetTreeCTSeriesBySubBrand(int subbrandid)
        {
            IList <VWTreeCTSeriesEntity> resultlist = new List <VWTreeCTSeriesEntity>();
            string _cachekey = "GetTreeCTSeriesBySubBrand_" + subbrandid;
            object obj       = MemCache.GetCache(_cachekey);

            if (obj == null)
            {
                IList <CarTypeBrandEntity> list        = new List <CarTypeBrandEntity>();
                CarTypeBrandEntity         brandentity = CarTypeBrandDA.Instance.GetCarTypeBrand(subbrandid);
                if (brandentity != null && brandentity.Id > 0)
                {
                    list.Add(brandentity);
                }
                if (list != null && list.Count > 0)
                {
                    foreach (CarTypeBrandEntity entity in list)
                    {
                        IList <CarTypeSeriesEntity> seri      = CarTypeSeriesBLL.Instance.GetCarTypeSeriesAll(-1, entity.Id);
                        VWTreeCTSeriesEntity        addentity = new VWTreeCTSeriesEntity();
                        addentity.Name     = entity.BrandName;
                        addentity.Children = seri;
                        resultlist.Add(addentity);
                    }
                    MemCache.AddCache(_cachekey, resultlist);
                }
            }
            else
            {
                resultlist = (IList <VWTreeCTSeriesEntity>)obj;
            }
            return(resultlist);
        }
Exemplo n.º 12
0
        public IList <ClassProDetailsEntity> GetListByPropertyId(int propertyid, int parentid, bool cache = false)
        {
            IList <ClassProDetailsEntity> list = null;

            if (cache)
            {
                string _cachekey = "ClassProDetailsList_" + propertyid + parentid;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = ClassProDetailsDA.Instance.GetListByPropertyId(propertyid, parentid);
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <ClassProDetailsEntity>)obj;
                }
            }
            else
            {
                list = ClassProDetailsDA.Instance.GetListByPropertyId(propertyid, parentid);
            }

            return(list);
        }
Exemplo n.º 13
0
        /// </summary>
        /// <returns>Store实体</returns>
        /// <param name="columns">要返回的列</param>
        public MemStoreEntity GetStoreByMemId(int memid, bool cache = false)
        {
            MemStoreEntity entity = new MemStoreEntity();

            if (cache)
            {
                string _cachekey = "GetStoreByMemId_" + memid;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    entity = MemStoreDA.Instance.GetStoreByMemId(memid);
                    MemCache.AddCache(_cachekey, entity);
                }
                else
                {
                    entity = (MemStoreEntity)obj;
                }
            }
            else
            {
                entity = MemStoreDA.Instance.GetStoreByMemId(memid);
            }

            return(entity);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 根据分类id 获取对应的分类产品属性
        /// </summary>
        /// <param name="classid"></param>
        /// <param name="pid"></param>
        /// <returns></returns>
        public IList <VWProductStyleSpecEntity> GetListByStyle(int styleid, int specid)
        {
            string _cachekey = "VWProductStyleSpecEntity" + "_" + styleid + "_" + specid;// SysCacheKey.VWProductStyleSpecKey;
            object _objcache = MemCache.GetCache(_cachekey);
            IList <VWProductStyleSpecEntity> _objlistall = new List <VWProductStyleSpecEntity>();

            if (_objcache == null)
            {
                _objlistall = ProductStyleSpecDA.Instance.GetListByStyle(styleid, specid);
                MemCache.AddCache(_cachekey, _objlistall);
            }
            else
            {
                _objlistall = (List <VWProductStyleSpecEntity>)_objcache;
            }
            var templist = from c in _objlistall
                           orderby c.Sort descending, c.SpecDetailName
            select c;

            if (templist == null)
            {
                return(null);
            }
            else
            {
                return(templist.ToList <VWProductStyleSpecEntity>());
            }
        }
Exemplo n.º 15
0
        /// <summary>
        /// 根据主键获取一个ClassProDetails实体记录。
        /// 该方法提供给其他实体的业务逻辑层(Logic)方法调用
        /// </summary>
        /// <returns>ClassProDetails实体</returns>
        /// <param name="columns">要返回的列</param>
        public ClassProDetailsEntity GetClassProDetails(int id, bool cache = false)
        {
            ClassProDetailsEntity list = null;

            if (cache)
            {
                string _cachekey = "GetClassProDetails_" + id;

                object obj = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = ClassProDetailsDA.Instance.GetClassProDetails(id);
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (ClassProDetailsEntity)obj;
                }
            }
            else
            {
                list = ClassProDetailsDA.Instance.GetClassProDetails(id);
            }
            return(list);
        }
Exemplo n.º 16
0
        /// <summary>
        /// 仅仅获取分类
        /// </summary>
        /// <param name="siteid"></param>
        /// <param name="classnenutype"></param>
        /// <param name="parentid"></param>
        /// <param name="iscache"></param>
        /// <returns></returns>
        public IList <VWClassesFoundEntity> GetClassFoundAll(int siteid, int parentid, bool iscache = false)
        {
            IList <VWClassesFoundEntity> list = new List <VWClassesFoundEntity>();

            if (iscache == false)
            {
                string _cachekey = "GetClassFoundAll_" + siteid + "_" + parentid;
                object obj       = MemCache.GetCache(_cachekey);

                if (obj == null)
                {
                    list = ClassesFoundDA.Instance.GetClassMenuAll(siteid, parentid);

                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <VWClassesFoundEntity>)obj;
                }
            }
            else
            {
                list = ClassesFoundDA.Instance.GetClassMenuAll(siteid, parentid);
            }
            return(list);
        }
Exemplo n.º 17
0
        public IList <ProductPropertyEntity> GetListByProductId(int productid, bool cache = false)
        {
            IList <ProductPropertyEntity> list = null;

            if (cache)
            {
                string _cachekey = "ProductPropertyList_" + productid;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = ProductPropertyDA.Instance.GetPropertyByProductId(productid);
                    foreach (ProductPropertyEntity _entity in list)
                    {
                        _entity.PropertyName       = ClassPropertiesBLL.Instance.GetClassProperties(_entity.PropertyId).Name;
                        _entity.PropertyDetailName = ClassProDetailsBLL.Instance.GetClassProDetails(_entity.PropertyDetailId).Name;
                    }
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <ProductPropertyEntity>)obj;
                }
            }
            else
            {
                list = ProductPropertyDA.Instance.GetPropertyByProductId(productid);
                foreach (ProductPropertyEntity _entity in list)
                {
                    _entity.PropertyName       = ClassPropertiesBLL.Instance.GetClassProperties(_entity.PropertyId, false).Name;
                    _entity.PropertyDetailName = ClassProDetailsBLL.Instance.GetClassProDetails(_entity.PropertyDetailId, false).Name;
                }
            }

            return(list);
        }
        ///// <summary>
        ///// 获得数据列表
        ///// </summary>
        public IList <VWProductSpecialDetailsEntity> GetProductSpecialDetailsList(int pageIndex, int pageSize, ref int recordCount, int specialid, int isactive)
        {
            IList <VWProductSpecialDetailsEntity> list = null;
            string _cachekey    = "GetProductSpecialDetailsList_" + pageIndex + "_" + pageSize + "_" + specialid + "_" + isactive;
            string _cachekeynum = "GetProductSpecialDetailsListNum_" + pageIndex + "_" + pageSize + "_" + specialid + "_" + isactive;
            object obj          = MemCache.GetCache(_cachekey);

            if (obj == null)
            {
                list = ProductSpecialDetailsDA.Instance.GetProductSpecialDetailsList(pageIndex, pageSize, ref recordCount, specialid, isactive);
                if (list != null && list.Count > 0)
                {
                    foreach (VWProductSpecialDetailsEntity entity in list)
                    {
                        entity.ProductDetail = ProductBLL.Instance.GetProVWByDetailId(entity.ProductDetailId);
                    }
                }
                MemCache.AddCache(_cachekey, list);
                MemCache.AddCache(_cachekeynum, recordCount);
            }
            else
            {
                list        = (IList <VWProductSpecialDetailsEntity>)obj;
                recordCount = StringUtils.GetDbInt(MemCache.GetCache(_cachekeynum));
            }

            return(list);
        }
Exemplo n.º 19
0
        public IList <InquiryProductEntity> GetInquiryProductAll(string ordercode, bool cache = false)
        {
            IList <InquiryProductEntity> list = null;

            if (cache)
            {
                string _cachekey = "GetInquiryProductAll" + ordercode;// SysCacheKey.InquiryProductSubListKey;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = InquiryProductDA.Instance.GetInquiryProductAll(ordercode);
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <InquiryProductEntity>)obj;
                }
            }
            else
            {
                list = InquiryProductDA.Instance.GetInquiryProductAll(ordercode);
            }

            return(list);
        }
Exemplo n.º 20
0
        public string GetAccessToken(bool cache = false)
        {
            string token     = "";
            string _cachekey = "GetWeChatAccessToken";

            object obj = MemCache.GetCache(_cachekey);

            //从缓存获取
            if (cache && obj != null)
            {
                WeChatTokenLogEntity log = (WeChatTokenLogEntity)obj;
                if (log.EndTime > DateTime.Now)
                {
                    token = log.AccessToken;
                }
            }
            //从数据库获取
            if (token == "")
            {
                string appid             = WeiXinConfig.GetAppId();
                WeChatTokenLogEntity log = WeChatTokenLogBLL.Instance.GetTokenByAppid(appid);
                if (log != null && log.Id > 0 && log.EndTime > DateTime.Now)
                {
                    token = log.AccessToken;
                    TimeSpan ts1   = log.EndTime - DateTime.Now;
                    int      tsSen = ts1.Seconds;
                    if (cache)
                    {
                        MemCache.AddCache(_cachekey, log, tsSen);
                    }
                }
                if (token == "")
                {
                    string result = WebServiceClient.QueryGetWebService(string.Format(WeiXinConfig.URL_FORMAT_TOKEN, WeiXinConfig.GetAppId(), WeiXinConfig.GetAppSecret()), "", null);
                    JavaScriptSerializer        serializer = new JavaScriptSerializer();
                    Dictionary <string, object> jsonObj    = serializer.Deserialize <dynamic>(result);
                    if (jsonObj.ContainsKey("access_token"))
                    {
                        token = jsonObj["access_token"].ToString();
                        WeChatTokenLogEntity tokenlog = new WeChatTokenLogEntity();
                        tokenlog.Appid       = appid;
                        tokenlog.CreateTime  = DateTime.Now;
                        tokenlog.EndTime     = DateTime.Now.AddSeconds(7000);
                        tokenlog.AccessToken = token;
                        WeChatTokenLogBLL.Instance.AddWeChatTokenLog(tokenlog);
                        if (cache)
                        {
                            MemCache.AddCache(_cachekey, tokenlog, 7000);
                        }
                    }
                    else
                    {
                        token = "";
                    }
                }
            }

            return(token);
        }
Exemplo n.º 21
0
        public IList <ClassesFoundEntity> GetClassListByLevel(int pid, int level, int siteid)
        {
            string _cachekey = "GetClassListByLevel_" + pid.ToString() + "_" + level.ToString() + "_" + siteid.ToString(); // SysCacheKey.ClassesFoundListKey;
            object _objcache = MemCache.GetCache(_cachekey);
            IList <ClassesFoundEntity> _objlistall = new List <ClassesFoundEntity>();

            _objlistall = ClassesFoundDA.Instance.GetClassesAllByPId(pid, level, siteid);
            MemCache.AddCache(_cachekey, _objlistall);
            return(_objlistall);
        }
Exemplo n.º 22
0
        public IList <VWProductMenuEntity> GetProductMenuAll(int menutype, int isactive, bool iscahce = false)
        {
            IList <VWProductMenuEntity> list = null;

            if (!iscahce)
            {
                list = ProductMenuDA.Instance.GetProductMenuAll(menutype, isactive);
                foreach (VWProductMenuEntity entity in list)
                {
                    if (entity.ProductDetailId > 0)
                    {
                        entity.ProductDetail = ProductBLL.Instance.GetProVWByDetailId(entity.ProductDetailId);
                    }
                    if (entity.ClassId > 0)
                    {
                        entity.ClassesFound = ClassesFoundBLL.Instance.GetClassesFound(entity.ClassId);
                    }
                    if (entity.BrandId > 0)
                    {
                        entity.Brand = BrandBLL.Instance.GetBrand(entity.BrandId);
                    }
                }
            }
            else
            {
                string _cachekey = "GetProductMenuAll" + menutype + isactive;// SysCacheKey.ProductMenuListKey;
                object obj       = MemCache.GetCache(_cachekey);
                if (obj == null)
                {
                    list = ProductMenuDA.Instance.GetProductMenuAll(menutype, isactive);
                    foreach (VWProductMenuEntity entity in list)
                    {
                        if (entity.ProductDetailId > 0)
                        {
                            entity.ProductDetail = ProductBLL.Instance.GetProVWByDetailId(entity.ProductDetailId);
                        }
                        if (entity.ClassId > 0)
                        {
                            entity.ClassesFound = ClassesFoundBLL.Instance.GetClassesFound(entity.ClassId);
                        }
                        if (entity.BrandId > 0)
                        {
                            entity.Brand = BrandBLL.Instance.GetBrand(entity.BrandId);
                        }
                    }
                    MemCache.AddCache(_cachekey, list);
                }
                else
                {
                    list = (IList <VWProductMenuEntity>)obj;
                }
            }
            return(list);
        }
Exemplo n.º 23
0
        public IList <VWTreeCTBrandEntity> GetTreeCarTypeBrand(int isstand = 1)
        {
            IList <VWTreeCTBrandEntity> resultlist = new List <VWTreeCTBrandEntity>();
            string _cachekey = "GetTreeCarTypeBrand_" + isstand;
            object obj       = MemCache.GetCache(_cachekey);

            if (obj == null)
            {
                IList <VWTreeCTBrandEntity> list = null;
                list = CarTypeBrandDA.Instance.GetStandardTreeCTB(isstand);
                if (list != null && list.Count > 0)
                {
                    //string[] firstletter = new Array();
                    ArrayList firstletter = new ArrayList();
                    foreach (VWTreeCTBrandEntity entity in list)
                    {
                        if (!firstletter.Contains(entity.PYFirst))
                        {
                            firstletter.Add(entity.PYFirst);
                        }
                        firstletter.Sort();
                    }
                    foreach (string letter in firstletter)
                    {
                        VWTreeCTBrandEntity entity = new VWTreeCTBrandEntity();
                        entity.PYFirst = letter;
                        resultlist.Add(entity);
                    }
                    foreach (VWTreeCTBrandEntity entity in list)
                    {
                        foreach (VWTreeCTBrandEntity entity2 in resultlist)
                        {
                            if (entity.PYFirst == entity2.PYFirst)
                            {
                                if (entity2.Children == null)
                                {
                                    entity2.Children = new List <VWTreeCTBrandEntity>();
                                }
                                entity2.Children.Add(entity);
                                break;
                            }
                        }
                    }
                }
                MemCache.AddCache(_cachekey, resultlist);
            }
            else
            {
                resultlist = (IList <VWTreeCTBrandEntity>)obj;
            }
            return(resultlist);
        }
Exemplo n.º 24
0
 public async Task GetWzAdContentAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "WzAdContentListKey";// SysCacheKey.WzAdContentListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <WzAdContentEntity> list = null;
             list = WzAdContentDA.Instance.GetWzAdContentAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
Exemplo n.º 25
0
 public async Task GetDicCouponsAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "DicCouponsListKey";// SysCacheKey.DicCouponsListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <DicCouponsEntity> list = null;
             list = DicCouponsDA.Instance.GetDicCouponsAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
Exemplo n.º 26
0
 public async Task GetCGOrderSendAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "CGOrderSendListKey";// SysCacheKey.CGOrderSendListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <CGOrderSendEntity> list = null;
             list = CGOrderSendDA.Instance.GetCGOrderSendAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
Exemplo n.º 27
0
 public async Task GetOrderAddressAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "OrderAddressListKey";// SysCacheKey.OrderAddressListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <OrderAddressEntity> list = null;
             list = OrderAddressDA.Instance.GetOrderAddressAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
Exemplo n.º 28
0
 public async Task GetCmsTempletAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "CmsTempletListKey";// SysCacheKey.CmsTempletListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <CmsTempletEntity> list = null;
             list = CmsTempletDA.Instance.GetCmsTempletAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
Exemplo n.º 29
0
 public async Task GetWeChatTokenLogAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "WeChatTokenLogListKey";// SysCacheKey.WeChatTokenLogListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <WeChatTokenLogEntity> list = null;
             list = WeChatTokenLogDA.Instance.GetWeChatTokenLogAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }
 public async Task GetProductSpecialDetailsAll()
 {
     await Task.Run(() =>
     {
         string _cachekey = "ProductSpecialDetailsListKey";// SysCacheKey.ProductSpecialDetailsListKey;
         object obj       = MemCache.GetCache(_cachekey);
         if (obj == null)
         {
             IList <ProductSpecialDetailsEntity> list = null;
             list = ProductSpecialDetailsDA.Instance.GetProductSpecialDetailsAll();
             MemCache.AddCache(_cachekey, list);
         }
     });
 }