62,046
社区成员
发帖
与我相关
我的任务
分享
if (!string.IsNullOrEmpty(context.Request.Form["Letter"].ToString()))
{
context.Cache["BrandCount"] = (brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
string[] depencise = { "BrandCount" };
CacheDependency cde = new CacheDependency(null, depencise);
if (context.Cache["Brand"] == null)
{
List<BrandInfo> brandinfoinfo = brand_bll.GetBrand(0, "");
context.Cache["Brand"] = brandinfoinfo;
context.Cache.Insert("Brand", brandinfoinfo, cde, DateTime.Now.AddMinutes(5), Cache.NoSlidingExpiration, CacheItemPriority.Default, null);
}
info = context.Cache["Brand"] as List<BrandInfo>;
string name = context.Request.Form["Letter"].Trim();
if (info.Count > 0)
{
for (int i = 0; i < info.Count; i++)
{
string bname = info[i].BName;
string abc = Tools.Tools.GetPYString(bname.Substring(0, 1)).ToUpper();
if (abc == name)
{
sb.Append("{BName:'" + bname + "',ID:'" + info[i].ID + "',Logo:'" + info[i].Logo + "'}");
sb.Append("%");
}
}
}
if (string.IsNullOrEmpty(sb.ToString()))
sb.Append("false");
context.Response.Write(sb.ToString());
context.Response.End();
}
context.Cache["BrandCount"] = (brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
string[] depencise = { "BrandCount" };
List<BrandInfo> lst=(brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
if (context.Cache["BrandCount"] != null&&context.Cache["BrandCount"]!=lst.Count.ToString())
context.Cache["BrandCount"] = lst.Count;
if (context.Cache["BrandCount"] == null)
context.Cache["BrandCount"] = (brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
context.Cache["BrandCount"] = (brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
string[] depencise = { "BrandCount" };
CacheDependency cde = new CacheDependency(null, depencise);
context.Cache["BrandCount"] = (brand_bll.GetBrand(0, "") as List<BrandInfo>).Count;
string[] depencise = { "BrandCount" };
CacheDependency cde = new CacheDependency(null, depencise);
if (context.Cache["Brand"] == null)
{
List<BrandInfo> brandinfoinfo = brand_bll.GetBrand(0, "");
context.Cache["Brand"] = brandinfoinfo;
context.Cache.Insert("Brand", brandinfoinfo, cde, DateTime.Now.AddMinutes(5), Cache.NoSlidingExpiration, CacheItemPriority.Default, null);
}
info = context.Cache["Brand"] as List<BrandInfo>;