SysManage/CommentOper.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class SysManage_CommentOper : System.Web.UI.Page
{
string id = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
id = Request.QueryString["id"];
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(id))
Get_Data();
}
}
void Get_Data()
{
try
{
DataTable dt = DB.getDataTable("select * from Comment where CommentId=" + id);
if (dt.Rows.Count == 1)
{
ltlCommentContent.Text = dt.Rows[0]["commentcontent"].ToString();
ltlCommentTime.Text = dt.Rows[0]["commenttime"].ToString();
ltlCommentUser.Text = dt.Rows[0]["commentuser"].ToString();
rblIsAudit.SelectedValue = Convert.ToBoolean(dt.Rows[0]["Isaudit"]) ? "1" : "0";
txtReCommentContent.Text = dt.Rows[0]["ReCommentContent"].ToString();
}
}
catch (Exception ex)
{
Common.ShowMessage(this.Page, "页面加载时出现异常。" + ex, "");
return;
}
}
/// <summary>
/// 按钮事件:提交信息
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
string sql2 = string.Empty;
if (string.IsNullOrEmpty(id))//添加
{
sql2 = "insert into Comment(ReCommentContent,isaudit) ";
sql2 += "values('" + txtReCommentContent.Text + "','" + rblIsAudit.SelectedValue + "')";
后面还有 18 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
