后台/管理员工作界面.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class 后台_管理员工作界面 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
//int n = this.GridView1.SelectedIndex;
// this.movieid_txt.TabIndex== this.GridView1.Rows[n].Cells[1].Text.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
// if (this.movieName_txt.Text == "" || this.dirctor_txt.Text == "" || this.leadingActor_txt.Text == "" || this.prices_txt.Text == "" || this.desciption_txt.Text == "")
{
}
// else
{
if (FileUpload1.HasFile)
SaveFile(FileUpload1.PostedFile);
else
{
this.UploadStatusLabel.Visible = true;
UploadStatusLabel.Text = "You did not specify a file to upload.";
}
string strurl = "image/";
strurl += FileUpload1.FileName;
string strCon = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnection sql = new SqlConnection();
sql.ConnectionString = strCon;
SqlCommand cmd = sql.CreateCommand();
string strSQL = "insert into Film (FilmName,Dircetor,Protagonist,PictureURL,BriefIntro,Price) values ";
strSQL += "('" + this.movieName_txt.Text + "','" + this.dirctor_txt.Text + "','" + this.leadingActor_txt.Text + "',";
strSQL += "'" + strurl + "','" + this.desciption_txt.Text + "','" + this.prices_txt.Text + "')";
cmd.CommandText = strSQL;
int b = 0;
sql.Open();
b = (int)cmd.ExecuteNonQuery();
if (b != 0)
后面还有 117 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
