reliuyan.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class reliuyan : System.Web.UI.Page
{
String myCnn = ConfigurationSettings.AppSettings["con"];
SqlConnection Conn;
public DataSet ds, ds2;
public DataRow dr, dr2;
string 编号;
bool flag;
int i;
protected void Page_Load(Object Src, EventArgs E)
{
flag = false;
编号 = Request.QueryString["编号"];
if (编号 != null)
{
Conn = new SqlConnection(myCnn);
string str = "select 标题,作者,邮箱,内容,时间,回复 FROM 留言表 WHERE 编号=" + 编号;
SqlDataAdapter da = new SqlDataAdapter(str, Conn);
ds = new DataSet();
da.Fill(ds, "留言表");
dr = ds.Tables["留言表"].Rows[0];
标题.Text = "Re:" + dr["标题"].ToString();
i = Convert.ToInt32(dr["回复"]);
string strSQL = "select 标题,作者,邮箱,内容,时间 FROM 回复表 WHERE 编号=" + 编号;
SqlDataAdapter da2 = new SqlDataAdapter(strSQL, Conn);
ds2 = new DataSet();
da2.Fill(ds2, "回复表");
Conn.Close();
}
}
public void Add_Click(Object sender, EventArgs E)
{
Conn = new SqlConnection(myCnn);
String strSQL = "insert into 回复表(作者,邮箱,标题,时间,内容,编号) values (@作者,@邮箱,@标题,@时间,@内容,@编号)";
SqlCommand Comm = new SqlCommand(strSQL, Conn);
Comm.Parameters.Add(new SqlParameter("@作者", SqlDbType.Char));
Comm.Parameters["@作者"].Value = 作者.Text;
Comm.Parameters.Add(new SqlParameter("@邮箱", SqlDbType.Char));
Comm.Parameters["@邮箱"].Value = 邮箱.Text;
Comm.Parameters.Add(new SqlParameter("@标题", SqlDbType.Char));
Comm.Parameters["@标题"].Value = 标题.Text;
Comm.Parameters.Add(new SqlParameter("@内容", SqlDbType.Char));
Comm.Parameters["@内容"].Value = 内容.Text;
后面还有 37 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。