Web/Tools/FenQiAction.ashx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;
using System.Data;
using Common;
using System.Text;
namespace Web.Tools
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    public class FenQiAction : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            string action = context.Request.Params["action"];
            //context.Response.Write(password);如果使用加密,则写入数据库要加密后的字段,然后登陆的时候就用加密后的字符串匹配
            //此处连接数据库查看是否有此用户,此处为了方便起见,直接判断
            BLL.Pictures bll = new BLL.Pictures();
            if (action == "price")
            {
                try
                {
                    int goods = int.Parse(context.Request["goods"].ToString());
                    Model.Pictures model = new Model.Pictures();
                    model = bll.GetModel(goods);
                    StringBuilder strSql = new StringBuilder();
                    BLL.ProductPrice bllprice = new BLL.ProductPrice();
                    DataSet ds = bllprice.GetList("proid=" + goods);
                    StringBuilder str = new StringBuilder();

                    strSql.Append("{\"GoodsPic\":\"" + model.ImgUrl + "\"}");
                    str.Append("{\"dtPrice\":[");
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        DataRow dr = ds.Tables[0].Rows[i];
                        if (i == ds.Tables[0].Rows.Count - 1)
                        {
                            str.Append("{\"PriceDetail\":\"" + dr["title"] + "\",\"Price\":\"" + dr["price"] + "\"}");
                        }
                        else
                        {
                            str.Append("{\"PriceDetail\":\"" + dr["title"] + "\",\"Price\":\"" + dr["price"] + "\"},");
                        }
                    }
                    str.Append("]}");
                    context.Response.Write(str);
                    context.Response.Write(strSql);
                }
                catch
                {
                    context.Response.Write("{\"GoodsPic\":\"\"}");
                }
            }
        }

        public bool IsReusable
        {
后面还有 7 行代码,购买后查看完整代码

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

AI 解读 AI

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

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