Web/Admin/online/edit.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Text;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Common;

namespace Web.Plugin.LineService.admin
{
    public partial class edit : Web.UI.ManagePage
    {
        private string action = ActionEnum.Add.ToString(); //操作类型
        protected int id;

        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");
            if (!string.IsNullOrEmpty(_action) && _action == ActionEnum.Edit.ToString())
            {
                this.action = ActionEnum.Edit.ToString();//修改类型
                this.id = DTRequest.GetQueryInt("id");
                if (this.id < 1)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.online_service().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                TreeBind(); //绑定分组
                if (action == ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }

        #region 赋值操作=================================
        private void ShowInfo(int _id)
        {
            BLL.online_service bll = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            ddlGroupId.SelectedValue = model.group_id.ToString();
            txtTitle.Text = model.title;
            rblIsLock.SelectedValue = model.is_lock.ToString();
            txtSortId.Text = model.sort_id.ToString();
            txtLinkUrl.Text = model.link_url;
            txtImgUrl.Text = model.img_url;
        }
        #endregion

        #region 绑定类别=================================
后面还有 85 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。