private List <WaittingTemplate> GetWaittingTemplateList() { string names = Request["List"]; string items = CompressionHelper.Decompress(names); List <WaittingTemplate> list = new List <WaittingTemplate>(); if (!string.IsNullOrEmpty(items)) { int index = 0; string currentKey = Request["Current"]; foreach (string name in items.Split(new string[] { "_-p-_" }, StringSplitOptions.RemoveEmptyEntries)) { string[] keyValue = name.Split(new string[] { "_-c-_" }, StringSplitOptions.RemoveEmptyEntries); if (keyValue.Length == 2) { if (string.IsNullOrEmpty(currentKey) && index == 0) { currentKey = keyValue[0]; } bool isCurrent = (keyValue[0] == currentKey); WaittingTemplate item = new WaittingTemplate() { Key = keyValue[0], Name = keyValue[1], Url = GetUrlByKey(keyValue[0]), IsCurrent = isCurrent }; list.Add(item); } index++; } } return(list); }
private List<WaittingTemplate> GetWaittingTemplateList() { string names = Request["List"]; string items = CompressionHelper.Decompress(names); List<WaittingTemplate> list = new List<WaittingTemplate>(); if (!string.IsNullOrEmpty(items)) { int index = 0; string currentKey = Request["Current"]; foreach (string name in items.Split(new string[] { "_-p-_" }, StringSplitOptions.RemoveEmptyEntries)) { string[] keyValue = name.Split(new string[] { "_-c-_" }, StringSplitOptions.RemoveEmptyEntries); if (keyValue.Length == 2) { if (string.IsNullOrEmpty(currentKey) && index == 0) { currentKey = keyValue[0]; } bool isCurrent = (keyValue[0] == currentKey); WaittingTemplate item = new WaittingTemplate() { Key = keyValue[0], Name = keyValue[1], Url = GetUrlByKey(keyValue[0]), IsCurrent = isCurrent }; list.Add(item); } index++; } } return list; }