System/Sys_Class_Edit.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;
public partial class System_Sys_Course_Add : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DB.Bind_Dropdownlist("select * from X_Manager where X_Manager_Idfy='辅导员' order by X_Manager_ID desc", DropDownList_User, "X_Manager_User", "X_Manager_User");
Bind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string sql2 = "update X_Class set X_Count=" + TextBox1.Text.Trim() + ",X_Manager_User='" + DropDownList_User.SelectedValue + "',X_Class_Name='" + txt_class.Text + "' where X_ID="+Request.QueryString["Nid"];
try
{
OleDbConnection cn = DB.OpenConnection();
OleDbCommand cmd = new OleDbCommand(sql2, cn);
cmd.ExecuteNonQuery();
cn.Close();
cn.Dispose();
Common.ShowMessage(this.Page, "更新成功!", "");
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
private void Bind()
{
OleDbConnection cn = DB.OpenConnection();
try
{
OleDbCommand cmd = new OleDbCommand("select * from [X_Class] where X_ID=" + Int32.Parse(Request.QueryString["NId"]), cn);
OleDbDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = dr["X_Count"].ToString();
txt_class.Text = dr["X_Class_Name"].ToString();
DropDownList_User.SelectedValue = dr["X_Manager_User"].ToString();
dr.Close();
dr.Dispose();
cn.Close();
cn.Dispose();
}
else
{
dr.Close();
后面还有 12 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。