private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); this.ddlProperty.SelectedValue = this.property; this.txtKeywords.Text = this.keywords; BLL.guidaudio bll = new BLL.guidaudio(); this.rptList.DataSource = bll.GetGuidAudioList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}", this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
public void GetDaoYouCiList(int page, string version, string equType, string equName) { string json = string.Empty; string tempStr = string.Empty; try { int count = 0;// daoyouciManager.GetDaoYouCiNum_WebService(area); BLL.guidaudio bll_guidaudio = new BLL.guidaudio(); DataSet ds_audio = bll_guidaudio.GetGuidAudioList(10, page, "", "sort_id asc,add_time desc", out count); bool nextPage = false; //是否有下一页 if (count < 10) { nextPage = false; } else { nextPage = true; } if (ds_audio != null && ds_audio.Tables[0].Rows.Count > 0) { var lst_audio = from p in ds_audio.Tables[0].AsEnumerable() select new { id = p.Field<int>("id"), audioname = p.Field<string>("audio_name"), audioimg = this.webUrl + p.Field<string>("img_url"), audiourl = this.webUrl + p.Field<string>("audio_path"), audiotype = p.Field<string>("remark1"), audiotime = p.Field<string>("audio_time"), audiosize = p.Field<string>("audio_size"), }; tempStr = Common.ObjToJson.ToJson(lst_audio.ToList()); } string dateStr = DateTime.Now.ToString("yyyy-MM"); json = "{\"status\":\"true\",\"currentDate\":\"" + dateStr + "\",\"nextPage\":\"" + nextPage.ToString().ToLower() + "\",\"data\":" + tempStr + "}"; } catch (Exception ex) { json = "{\"status\":\"false\",\"data\":\"" + ex.Message + "\"}"; } WriteWebServiceLog(version, equType, equName, "GetDaoYouCiList", ""); Context.Response.Write(json); Context.Response.End(); }