DTcms.Web/admin/attribute/edit.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;
namespace DTcms.Web.admin.attribute
{
public partial class edit : Web.UI.ManagePage
{
private string action = DTEnums.ActionEnum.Add.ToString(); //操作类型
private int channel_id;
private int id = 0;
protected void Page_Load(object sender, EventArgs e)
{
string _action = DTRequest.GetQueryString("action");
this.channel_id = DTRequest.GetQueryInt("channel_id");
if (this.channel_id == 0)
{
JscriptMsg("频道参数不正确!", "back", "Error");
return;
}
if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
{
this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
this.id = DTRequest.GetQueryInt("id");
if (this.id == 0)
{
JscriptMsg("传输参数不正确!", "back", "Error");
return;
}
if (!new BLL.attributes().Exists(this.id))
{
JscriptMsg("记录不存在或已被删除!", "back", "Error");
return;
}
}
if (!Page.IsPostBack)
{
if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
{
ShowInfo(this.id);
}
}
}
#region 赋值操作=================================
private void ShowInfo(int _id)
{
BLL.attributes bll = new BLL.attributes();
Model.attributes model = bll.GetModel(_id);
txtTitle.Text = model.title;
txtRemark.Text = model.remark;
ddlType.SelectedValue = model.type.ToString();
txtDefaultValue.Text = model.default_value;
txtSortId.Text = model.sort_id.ToString();
}
后面还有 70 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
