EasyShop/ashx/AddBrand.ashx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using conn;
using System.Text;
using System.Data;
using FormatJosn;
using OpSql;
using System.Data.SqlClient;
namespace Mall.ashx
{
/// <summary>
/// AddBrand 的摘要说明
/// </summary>
public class AddBrand : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string Name = context.Request.Params["name"].ToString();
string Content = context.Request.Params["content"].ToString();
DbConn conn = new DbConn();
conn.open();
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into TB_MC_Brand(Name,Content) values (@Name,@Content)");
SqlParameter[] parm = {
new SqlParameter("@Name",Name),
new SqlParameter("@Content",Content),
};
int k = ExeSql.SqlHelper.ExecuteNonQuery(ExeSql.SqlHelper.ConnectionString, strSql.ToString(), parm);
string mujson = "";
if (k > 0)
{
mujson = "add successs";
}
//string mujson = FormatToJson.ToJson(ds, "result");
conn.close();
context.Response.Write(mujson);
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。