Exemple #1
0
        private void get_point_list(HttpContext context)
        {
            int       uid = DTRequest.GetInt("uid", 0);
            DataTable dt  = new BLL.point().GetList(0, "user_id=" + uid, "add_time desc").Tables[0];

            dt.Columns.Add("time", typeof(string));
            foreach (DataRow dr in dt.Rows)
            {
                dr["time"] = Convert.ToDateTime(dr["add_time"]).ToString("yyyy-MM-dd HH:mm:ss");
            }
            context.Response.Write(JsonHelper.DataTableToJSON(dt));
        }
Exemple #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            DataTable dt = new BLL.point().GetList(pageSize, this.page, _strWhere, _orderby, out this.totalCount).Tables[0];

            dt.Columns.Add("username", typeof(string));
            foreach (DataRow dr in dt.Rows)
            {
                string name = new BLL.user().GetModel(Convert.ToInt32(dr["user_id"])).nickname;
                dr["username"] = name;
            }
            this.rptList.DataSource = dt;
            this.rptList.DataBind();
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("point_log.aspx", "keywords={0}&page={1}",
                                              this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }