EasyShop/ashx/AddMsg.ashx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using 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;
using System.Data.SqlClient;
namespace Mall.ashx
{
/// <summary>
/// AddMsg 的摘要说明
/// </summary>
public class AddMsg : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string ID, ClassName, MsgEmailTitle, MsgEmailContent, MsgPhoneTitle, MsgPhoneContent, MsgSiteTitle, MsgSiteContent;
//msgid, classname, emailtitle, emailcontent, phonetitle, phonecontent, zntitle,zncontent
//ID = context.Request.Params["msgid"].ToString();
ClassName = context.Request.Params["classname"].ToString();
MsgEmailTitle = context.Request.Params["emailtitle"].ToString();
MsgEmailContent = context.Request.Params["emailcontent"].ToString();
MsgPhoneTitle = context.Request.Params["phonetitle"].ToString();
MsgPhoneContent = context.Request.Params["phonecontent"].ToString();
MsgSiteTitle = context.Request.Params["zntitle"].ToString();
MsgSiteContent = context.Request.Params["zncontent"].ToString();
DbConn conn = new DbConn();
conn.open();
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into TB_MC_MsgEmailPhone(ClassName, MsgEmailTitle, MsgEmailContent, MsgPhoneTitle, MsgPhoneContent, MsgSiteTitle, MsgSiteContent, addtime) values (@ClassName, @MsgEmailTitle, @MsgEmailContent, @MsgPhoneTitle, @MsgPhoneContent, @MsgSiteTitle, @MsgSiteContent, @addtime)");
//strSql.Append("update TB_MC_WebNavMenu set Name='" + Name + "', LinkUrl='" + LinkUrl + "', OpenTarget='" + OpenTarget + "', InWebSite='" + InWebSite + "', Sort=" + Sort + ", ShowHide='" + ShowHide + "', addtime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'");
//strSql.Append(" where ID=" + ID + "");
SqlParameter[] parm = {
new SqlParameter("@ClassName",ClassName),
new SqlParameter("@MsgEmailTitle",MsgEmailTitle),
new SqlParameter("@MsgEmailContent",MsgEmailContent),
new SqlParameter("@MsgPhoneTitle",MsgPhoneTitle),
new SqlParameter("@MsgPhoneContent",MsgPhoneContent),
new SqlParameter("@MsgSiteTitle",MsgSiteTitle),
new SqlParameter("@MsgSiteContent",MsgSiteContent),
new SqlParameter("@addtime",DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))
};
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);
}
后面还有 10 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。