Web/Admin/Channel/Edit.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using cosmos.Web.UI;
namespace cosmos.Web.Admin.Channel
{
public partial class Edit : ManagePage
{
private cosmos.BLL.Channel bll = new cosmos.BLL.Channel();
private cosmos.Model.Channel model = new cosmos.Model.Channel();
public int kindId; //种类
public int classId; //ID
protected void Page_Load(object sender, EventArgs e)
{
//取得栏目传参
if (int.TryParse(Request.Params["kindId"], out kindId) && int.TryParse(Request.Params["classId"], out classId))
{
model = bll.GetModel(classId);
if (!Page.IsPostBack)
{
//数据绑定
ShowInfo();
}
}
else
{
JscriptMsg(350, 230, "错误提示", "<b>出现错误!</b>您要修改类别的种类不明确或参数不正确。", "back", "Error");
}
}
//绑定数据
private void ShowInfo()
{
this.lblPid.Text = model.ParentId.ToString();
if (model.ParentId > 0)
{
this.lblPname.Text = bll.GetChannelTitle(model.ParentId);
}
else
{
this.lblPname.Text = "顶级类别";
}
this.txtTitle.Text = model.Title;
this.txtSortId.Text = model.SortId.ToString();
}
//保存修改
protected void btnSave_Click(object sender, EventArgs e)
{
model.Title = txtTitle.Text.Trim();
model.SortId = int.Parse(txtSortId.Text.Trim());
//修改栏目
bll.Update(model);
//保存日志
SaveLogs("[栏目类别]修改类别:" + model.Title);
后面还有 5 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。