WebSite/Admin/AdminTest/HelpInfo/AddShopHelp.aspx.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Model;
using BLL;


namespace ShopAdmin.HelpInfo
{
    public partial class AddShopHelp : System.Web.UI.Page
    {
        private Int32 adminId;
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (SubTool.CheckAdminLogin("0"))
            //{
            if (CheckAdminLogin(MyCookie.getCookiesValue("shop8517Admin", "AdminType")))
            {
                adminId = WebUtility.CheckInt(MyCookie.getCookiesValue("shop8517Admin", "AdminId"));
                if (!this.IsPostBack)
                {
                    btnAdd.Attributes.Add("onclick", "return jsCheck();");
                }
            }
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            D_ShopHelpInfo hInfo = new D_ShopHelpInfo();
            hInfo.HelpTitle = WebUtility.CheckStr(txtHelpTitle.Text);
            //hInfo.HelpClassId = WebUtility.CheckInt(ddlRootClass.SelectedValue);
            //hInfo.HelpClassName=ddlRootClass.Items[ddlRootClass.SelectedIndex].Text;
            hInfo.ClassId = WebUtility.CheckInt(Request["txtClassId"]);
            hInfo.ClassName = WebUtility.CheckStr(Request["txtClassName"]);
            hInfo.ParentIdRoute = WebUtility.CheckStr(Request["txtParentId"]);
            hInfo.ParentNameRoute = WebUtility.CheckStr(Request["txtParentName"]);
            hInfo.HelpContent = txtContent.Text;
            hInfo.IsPost = 1;
            hInfo.PostTime = DateTime.Now;

            if (new D_ShopHelp().Add_ShopHelp(hInfo) == 1)
            {
                Response.Write(WebUtility.AlertUrl("添加帮助成功", "AddShopHelp.aspx"));
                Response.End();
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", WebUtility.Alert("添加帮助失败!!"));
            }
        }



        public static bool CheckAdminLogin(string userType)
        {

            HttpCookie newcookie = HttpContext.Current.Request.Cookies["shop8517Admin"];
后面还有 38 行代码,购买后查看完整代码

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

AI 解读

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

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