Productd.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BLL.Article;
using CSA.DAL;
using Com;
public partial class Productd : System.Web.UI.Page
{
    protected string cur_Code, cur_Id, KindName, checkCode, bigKindName, smallKindName;
    protected DataRow drList;
    protected DataTable dtList, dtProComment;
    protected void Page_Load(object sender, EventArgs e)
    {
        cur_Code = Request.QueryString["Code"];   //接收Code
        cur_Id = Request.QueryString["Id"];               //接收传进来的Id
        if (string.IsNullOrEmpty(cur_Code))                //如果没有Code传进,自定义Code
        {
            cur_Code = "0101";
        }
        addMsg();
        BindProducts();
        getKindName();

    }
    protected void BindProducts()
    {

        drList = BLL.Product.Product.GetByID(Convert.ToInt32(cur_Id));
        KindName = BLL.Product.Kind.getPath(cur_Code);
        string sql = "select top 4 * from bs_Products where bs_prokindcode like '" + cur_Code + "%' and id>" + cur_Id + " order by SortNo asc";
        dtList = DBAccess.getRS(sql);
        if (dtList == null || dtList.Rows.Count < 1)
        {
            sql = " select top 4 * from bs_Products where bs_prokindcode like '" + cur_Code + "%' and id<" + cur_Id + " order by SortNo desc ";
            dtList = DBAccess.getRS(sql);
        }
        sql = "select * from bs_proComments where status=0 and Bs_ProductsID=" + cur_Id;
        dtProComment = DBAccess.getRS(sql);

    }

    private void addMsg()
    {

        if (Request.Form["action"] != null && Request.Form["action"] == "AddMsg")
        {
            checkCode = Request.Form["reg_checkcode"];
            if (!checkCode.Equals(Session[Const.sessionNames[1]]))
            {
                CSA.HC.Common.AlertAndGoBack("验证码错误");
                return;
            }
            SQLBuilder builder = new SQLBuilder("bs_procomments");                       //构建一个SQLBuilder
            builder.AutoSetInfo(Request.Form);
            builder.AddData("ip", CSA.HC.Common.getIP());
            builder.AddData("addtime", DateTime.Now.ToString());
            builder.AddData("Bs_ProductsID", cur_Id);
后面还有 24 行代码,购买后查看完整代码

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

AI 解读 AI

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

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