manage/友情链接/update.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
namespace 网上订餐系统.manage.友情链接
{
public partial class update : System.Web.UI.Page
{
SqlServer db = new SqlServer();
int id;
protected void Page_Load(object sender, EventArgs e)
{
id = RequestHelper.GetIntValue("id");
if (!this.IsPostBack)
{
if(id>0)
{
db.SQL = "select * from 友情链接 where id=@id";
db.AddSqlParameter("@id", id);
DataTable dtInfo = db.GetDataTable();
if (dtInfo.Rows.Count == 0)
{
Response.Write(ScriptHelper.AlertAndBack("信息不存在,可能已被删除"));
Response.End();
}
else
{
this.tbName.Text = dtInfo.Rows[0]["name"].ToString();
this.tbURL.Text = dtInfo.Rows[0]["地址"].ToString();
this.Image链接.ImageUrl = dtInfo.Rows[0]["图片"].ToString();
}
}
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.fuPath.FileName))
{
string[] ext = this.fuPath.FileName.Split(new char[] { '.' });
//MIME类型进行类型判断才是最准确的
if (!(ext[ext.Length - 1].Equals("jpg", StringComparison.CurrentCultureIgnoreCase)
|| ext[ext.Length - 1].Equals("jpeg", StringComparison.CurrentCultureIgnoreCase)
|| ext[ext.Length - 1].Equals("gif", StringComparison.CurrentCultureIgnoreCase)))
{
后面还有 68 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
