boguCms/App_Admin/case/CaseItem.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using AccessDal;
using System.IO;
public partial class App_Admin_case_CaseItem : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetDorp();
GetPage();
}
}
protected void GetPage()
{
if (Request.Params["p"] == null)
{ labtit.Text = "添加案例( Add Case )";
}
else
{ labtit.Text = "修改案例 ( Case changes )";
int id = Convert.ToInt32(Request.QueryString["p"]);
CaseInfo info = Case.GetModel(id);
txtcasename.Text = info.CaseName;
txtcontent.Text = info.CaseContent;
txtdesc.Text = info.CaseDesc;
txtcasetime.Text = info.CaseTime;
dropcol.SelectedValue = info.CCID.ToString();
caseimg.Visible = true;
if (info.CaseImg == "")
{ caseimg.ImageUrl = "/userimg/nopop.gif"; }
else { caseimg.ImageUrl = info.CaseImg; }
}
}
protected void GetDorp()
{
dropcol.DataSource = CaseCol.GetList(0, 0);
dropcol.DataTextField = "CCName";
dropcol.DataValueField = "ID";
dropcol.DataBind();
}
protected void delbtn_Click(object sender, EventArgs e)
{
int id = Convert.ToInt32(Request.QueryString["p"]);
CaseInfo info = Case.GetModel(id);
if (info.CaseImg != "")
{ File.Delete(Server.MapPath(info.CaseImg)); }
int flag = Case.Delete(id);
if (flag != 0)
{
Page.RegisterStartupScript("script", "<script>alert('此案例已删除!');window.location.href='Default.aspx'</script>");
}
else
{ Page.RegisterStartupScript("script", "<script>alert('数据错误,删除失败!');</script>"); }
后面还有 103 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。