Web/Admin/Chedui/Chedui_add.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Maticsoft.Web.Admin.Chedui
{
public partial class Chedui_add : System.Web.UI.Page
{
BLL.Chedui b_c = new BLL.Chedui();
protected void Page_Load(object sender, EventArgs e)
{
Model.MasterUser adminmod = (Model.MasterUser)Session["User"];
if (adminmod == null)
{
Response.Redirect("/Admin/Login.aspx");
return;
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
Model.Chedui cheduiModel = new Model.Chedui();
cheduiModel.Atitle = Request.Form["title"];
cheduiModel.Abstract = Request.Form["Abstract"];
cheduiModel.Small_img = hd_img.Value;
cheduiModel.Aid = b_c.Add(cheduiModel);
if (cheduiModel.Aid > 0)
{
ClientScript.RegisterStartupScript(this.GetType(), "", "parent.Dialog.alert('展示添加成功!');location.href='Chedui_list.aspx';", true);
}
else
ClientScript.RegisterStartupScript(this.GetType(), "", "parent.Dialog.alert('展示添加失败!');", true);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
