Web/App/Android/GetIntegralList.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

using WMPT.Model;
using WMPT.SQLServerDAL;
using WMPT.Common;

public partial class App_AndriodV2_GetIntegralList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        int pageindex = HjNetHelper.GetQueryInt("pageindex", 1);
        int userid =  HjNetHelper.GetQueryInt("userid", 0);
        int pagesize = 8;
        int pagecount = 1;
        string sql = " 1=1 ";
        sql += " and custid='" + userid + "'";
        Integral dal = new Integral();
        IList<IntegralInfo> list = dal.GetList(pagesize, pageindex, sql, "IntegralId", 1);


        int count = dal.GetCount(sql);
        if (count % pagesize == 0)
        {
            pagecount = count / pagesize;
        }
        else
        {
            pagecount = count / pagesize + 1;
        }
        StringBuilder shoplistjson = new StringBuilder();
        shoplistjson.Append("{\"page\":\"" + pageindex + "\",\"total\":\"" + pagecount + "\",\"datalist\":[");

        IntegralInfo info = new IntegralInfo();

        for (int i = 0; i < list.Count; i++)
        {
            info = list[i];
            shoplistjson.Append("{\"IntegralId\":\"" + info.IntegralId + "\",\"GiftName\":\"" + info.GiftName + "\",\"PayIntegral\":\"" + info.PayIntegral + "\",\"Cdate\":\"" + info.Cdate + "\",\"State\":\"" + info.State + "\"},");
        }

        shoplistjson.Append("]}");

        Response.Write(shoplistjson.ToString().Replace(",]}", "]}"));
        Response.End();
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。