asublist.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.Data;

public partial class m_asublist : System.Web.UI.Page
{
    public string ArticalType = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindSubType();
        }

    }

    private void bindSubType()
    {
        string atype = Request.QueryString["atype"];

        string strSql = "";
        DataTable dt = null;

        string ArticalTypeID = DES.MD5Decrypt(atype);
        strSql = "select Type,SubType from tbl_atype where ID =" + ArticalTypeID;
        dt = DB.GetTable(strSql);
        ArticalType = dt.Rows[0]["Type"].ToString();


        strSql = "select ID,Type from tbl_atype where " + toWhere(dt.Rows[0]["SubType"].ToString()) + " order by ID";
        dt = DB.GetTable(strSql);
        repeatAsublist.DataSource = dt;
        repeatAsublist.DataBind();


    }

    private string toWhere(string con)
    {
        string[] arr = con.Split(new char[] { ',' });
        string ret = "";
        foreach (string str in arr)
        {
            ret += "ID=" + str + " or ";
        }

        return ret.Remove(ret.Length - 4);
    }

}

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

AI 解读

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

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