CmsWeb/shop/looseList.aspx.cs

(开头部分) 5KB

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

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

public partial class shop_looseList : System.Web.UI.Page
{
    protected int user_id;//会员id
    protected string classIdList;
    DataTable SearchTable = new DataTable();  //声明一个DataTable对象
    DataRow drtable;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Cms.Model.C_user userModel = adminUser.GetuserLoginState();//验证登录
            this.user_id = userModel.id;
            this.BindDate();
        }
    }
    #region 赋值操作========================
    public void BindDate()
    {

        string shape = Request["shape"].ToString();
        string price = Request["price"].ToString();
        string[] pArray = price.Split(';');
        string priceStart = pArray[0];
        string priceEnd = pArray[1];

        string stone = Request["stone"].ToString();
        string[] rArray = stone.Split(';');
        string stoneStart = rArray[0].ToString();
        string stoneEnd = rArray[1].ToString();

        string color = Request["color"].ToString();
        string clarity = Request["clarity"].ToString();
        string cut = Request["cut"].ToString();

        StringBuilder sbuBuilder = new StringBuilder();
        sbuBuilder.Append("and price between " + priceStart + " and " + priceEnd);
        sbuBuilder.Append("and main_stone_weight between " + stoneStart + " and " + stoneEnd);
        if (shape != "")
        {
            sbuBuilder.Append("and diamond_shape like '%" + shape + "%'");
        }
        if (color != "")
        {
            sbuBuilder.Append("and color like '%" + color + "%'");
        }
        if (clarity != "")
        {
            sbuBuilder.Append("and clarity like '%" + clarity + "%'");
        }
        if (cut != "")
        {
后面还有 109 行代码,购买后查看完整代码

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

AI 解读

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

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