admin/News/jishuEdit.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.OleDb;
using SystemBll;
using SystemNewsBll;
public partial class admin_News_jishuEdit : System.Web.UI.Page
{
BLL bll = new BLL();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindData();
}
}
private void BindData()
{
// BindDllClass();
DataSet ds = bll.select_yes("jishu", "id=@n0", null, Request["id"].ToString());
title.Text = ds.Tables[0].Rows[0]["title"].ToString();
TextBox1.Text = ds.Tables[0].Rows[0]["title_en"].ToString();
// ddlclass.Text = ds.Tables[0].Rows[0]["classid"].ToString();
WebEditor1.Text = ds.Tables[0].Rows[0]["content"].ToString();
WebEditor2.Text = ds.Tables[0].Rows[0]["content_en"].ToString();
Updatabtn.CommandArgument = ds.Tables[0].Rows[0]["id"].ToString();
}
private void BindDllClass()
{
DataSet ds = bll.select_all("newsclass");
ddlclass.DataSource = ds;
ddlclass.DataTextField = "title";
ddlclass.DataValueField = "cid";
ddlclass.DataBind();
}
protected void Updatabtn_Click(object sender, EventArgs e)
{
if (Page.IsValid == true)
{
string id = Updatabtn.CommandArgument.ToString();
string title1 = title.Text.Trim();
string title2 = TextBox1.Text.Trim();
string content = WebEditor1.Text;
string content_en = WebEditor2.Text;
// string classid = ddlclass.SelectedValue.ToString();
int a = NewsBll.UpdateDatajishu("1", title1, title2, content, content_en, id);
if (a > 0)
{
Response.Write("<script>if (confirm('" + "修改信息成功!是-转到列表,否-选择继续修改" + "')){window.location.href='jishuList.aspx'}</script>");
}
else
{
后面还有 13 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。