FLOWER/Admin/Content/ReContent.aspx.cs

(完整代码) 2KB

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;

namespace FLOWER.Admin.Content
{
    public partial class ReContent : System.Web.UI.Page
    {
        SQLHelper sqlhelper = new SQLHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
               
                    string constring = SQL.constr;
                    SqlConnection str = new SqlConnection(constring);
                    str.Open();
                    string sqlstr = "select * from usercomment where infoid='" + Request["id"].ToString() + "'";
                    SqlDataAdapter myda = new SqlDataAdapter(sqlstr, str);
                    DataSet myds = new DataSet();
                    myda.Fill(myds, "usercomment");
                    DataRowView mydrv = myds.Tables["usercomment"].DefaultView[0];
                    TextBox3.Text = Convert.ToString(mydrv.Row["Content"]);
                    TextBox4.Text = Convert.ToString(mydrv.Row["ReContent"]);
                    Literal1.Text = sqlhelper.GetSingle("select CurtainName from Curtains where CurtainId = " + Convert.ToString(mydrv.Row["bkid"])).ToString();
                    Literal2.Text = "<img src='/Images/" + Convert.ToString(mydrv.Row["star"]) +".png' />";
                    str.Close();
                
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Hashtable ht = new Hashtable();
            ht.Add("Content", TextBox3.Text);
            if (TextBox4.Text.Trim() != "")
            {
                ht.Add("verify", 1);
            }
            else 
            {
                ht.Add("verify", 0);
            }
            ht.Add("ReContent", TextBox4.Text);
            ht.Add("infoid", Request["id"].ToString());
            new Common.SQLHelper().EditContent("usercomment", ht, "infoid");
            ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('操作成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0}, function () { location.href = 'MessageContent.aspx';})", true);
                
        }
    }
}

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

AI 解读 AI

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

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