EasyShop/ashx/QueryPayMothed.ashx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using conn;
using System.Text;
using System.Data;
using FormatJosn;
using ExeSql;
using System.Data.SqlClient;
namespace EasyShop.ashx
{
    /// <summary>
    /// QueryPayMothed 的摘要说明
    /// </summary>
    public class QueryPayMothed : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string ordernum = context.Request.Params["ordernum"].ToString();
            string paytype=context.Request.Params["paytype"].ToString();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ID,ClassName from TB_MC_PayType");
            SqlParameter[] parm = {};
            DataSet ds = ExeSql.SqlHelper.ExecuteDataSet(SqlHelper.ConnectionString, strSql.ToString(), parm);
            //string mujson = FormatToJson.ToJson(ds, "data");
            string mujson = "";
            string dem = "";
            int num = ds.Tables[0].Rows.Count;
            for (int i = 0; i < num; i++)
            {
                if (ds.Tables[0].Rows[i][0].ToString() == paytype)
                {
                    dem += "<option value='" + ds.Tables[0].Rows[i][0].ToString() + "' selected='selected'>" + ds.Tables[0].Rows[i][1].ToString() + "</option>";
                }
                else
                {
                    dem += "<option value='" + ds.Tables[0].Rows[i][0].ToString() + "'>" + ds.Tables[0].Rows[i][1].ToString() + "</option>";
                }
            }
            mujson = dem;
            context.Response.Write(mujson);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

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

AI 解读 AI

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

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