BookShop.Web/Manage/Book_Web/SelectCate.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CTL.Common;
namespace BookShop.Web.Manage
{
public partial class SelectCate : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int cateId = Utils.StrToInt(Requests.Query("cateid"));
parentId.Value = cateId.ToString();
}
}
/// <summary>
/// 按钮事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void subitBtn_Click(object sender, EventArgs e)
{
int bookid = Utils.StrToInt(Requests.Query("bookid"));
int cateId = Utils.StrToInt(parentId.Value.Trim());
if (cateId <= 0)
{
ShowError("请先选择图书类别!");
}
string url = "EditBook.aspx?";
if (bookid > 0)
{
url += "action=edit&cateid=" + cateId + "&bookid=" + bookid;
}
else
{
url += "action=add&cateid=" + cateId;
}
Response.Redirect(url);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。