public string GetFestivalList(HttpContext context)
        {
            BCtrl_Festival        bll  = new BCtrl_Festival();
            List <FestivalEntity> list = bll.GetFestivalList("", 3);

            if (list == null)
            {
                return(string.Empty);
            }

            var groupYear = list.OrderByDescending(o => o.StartTime).GroupBy(o => o.StartTime.ToString("yyyy年"));
            List <FestivalEntity> resultlist = new List <FestivalEntity>();

            foreach (var year  in groupYear)
            {
                FestivalEntity entity = new FestivalEntity {
                    FestivalName = year.Key, FestivalList = year.Select(o => o).ToList()
                };
                resultlist.Add(entity);
            }

            string result = StringUti.ToUnicode(JsonObj <object> .ToJsonString(resultlist));

            return(result);
        }
        public string GetFestivalListByGroup(HttpContext context)
        {
            BCtrl_Festival bll = new BCtrl_Festival();

            string qvalue = context.Request.QueryString["query"];

            List <FestivalEntity> list = bll.GetFestivalList(qvalue, 3);

            if (list != null)
            {
                dynamic result = new { query = "Unit", suggestions = list.Select(o => new { value = o.FestivalName, data = new { category = o.StartTime.ToString("yyyy年"), text = o.FestivalID } }) };

                string temp = StringUti.ToUnicode(JsonObj <object> .ToJsonString(result));
                return(temp);
            }

            return(string.Empty);
        }
        private DataTable GetQueryData(bool isDownload)
        {
            int                  totalcnt = 0;
            BCtrl_Festival       bll      = new BCtrl_Festival();
            searchFestivalEntity entity   = new searchFestivalEntity();

            if (!string.IsNullOrEmpty(txtStartTime))
            {
                entity.StartTime = txtStartTime;
            }
            if (!string.IsNullOrEmpty(txtEndTime))
            {
                entity.EndTime = txtEndTime;
            }
            entity.PageSize        = base.PageSize;
            entity.PageIndex       = base.PageIndex;
            entity.UseDBPagination = !isDownload;
            entity.OrderfieldType  = OrderFieldType.Desc;
            DataTable db = bll.GetFestivalList(entity, out totalcnt);

            base.TotalRecords = totalcnt;
            return(db);
        }