⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mo_modinamedes.aspx.cs

📁 易想商城系统
💻 CS
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Shop.Web.UI;

namespace YXShop.Web.Admin.Templates
{
    public partial class Mo_ModiNameDes : System.Web.UI.Page
    {
        BasePage bp = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            YXShop.Common.WebUtility.WebControlOnblur(this.ProgrammeName);//去除空格
            YXShop.Common.WebUtility.WebControlOnblur(this.ProgrammeDes);//去除空格

            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["TPID"]))
                {
                    if (!PowerTree.PowerPass.isPass("010001004", PowerTree.PowerPanel.PowerType.update))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有修改模板方案的权限!", "../index.aspx");
                    }
                    else
                    {
                        try
                        {
                            BindData(Request.QueryString["TPID"].ToString());
                        }
                        catch { }
                    }
                }
                else 
                {
                    if (!PowerTree.PowerPass.isPass("010001002", PowerTree.PowerPanel.PowerType.add))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有添加模板方案的权限!", "../index.aspx");
                    }
                }
            }
        }
        public void BindData(string _mid)
        {
            YXShop.TemplateAction.TemplateModel templateObj = new YXShop.TemplateAction.TemplateModel();
            templateObj=YXShop.TemplateAction.TemplateDo.GetTemplateSingleNameDes(_mid);
            ProgrammeName.Text = templateObj.TP_Name;
            ProgrammeDes.Text = templateObj.TP_Des;
      
        }

        protected void ModiBtn_Click(object sender, EventArgs e)
        {
            if ((!string.IsNullOrEmpty(Request.QueryString["TPID"])) && (!string.IsNullOrEmpty(ProgrammeName.Text)) && (!string.IsNullOrEmpty(ProgrammeDes.Text)))
            {
                try
                {
                    int result = YXShop.TemplateAction.TemplateDo.UpdateTemplateSingleNameDes(Request.QueryString["TPID"], ProgrammeName.Text.Replace("'", ""), ProgrammeDes.Text.Replace("'", ""));
                  if (result > -1)
                  {
                      msg.Text = "<font color='red'>操作提示:修改成功!</font>";
                  }
                  else {
                      msg.Text = "<font color='red'>操作提示:修改失败!</font>";  
                  }
                }
                catch {
                    msg.Text = "<font color='red'>操作提示:修改失败!</font>";                
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -