goodsbrandinsert.aspx.cs

来自「c#三层架构项目开发的全过程」· CS 代码 · 共 49 行

CS
49
字号
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;


namespace 金利来分销管理系统.Goods
{
    public partial class GoodsDiscount : System.Web.UI.Page
    {
        BLL.Goods.BrandAddBll BrandShow1;
        BLL.Employee.EmployeeBll employeebllshow;

        public GoodsDiscount()
        {
            BrandShow1 = new BLL.Goods.BrandAddBll();
            employeebllshow = new BLL.Employee.EmployeeBll();

        }

        protected void Page_Load(object sender, EventArgs e)
        {
             //用户权限
            if (Session["employee_id"] == null)
            {
                Response.Write("<script>alert('请您登陆系统');location.href='../Enter.aspx'</script>");
            }
            else
            {
                if (employeebllshow.UserRole(Session["role_id"].ToString(), "15") == false )
                {
                    Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
                }
            }
        }

        #region 添加商品品牌按钮
        protected void brandbtt_Click(object sender, EventArgs e)
        {
            BrandShow1.Addbrand(this.txtbrand_Name.Text,this.txtbrand_Explain.Text);
            Response.Write("<script>alert('添加商品品牌 【" + this.txtbrand_Name.Text + "】 成功!')</script>");
        }
        #endregion
    }
}

⌨️ 快捷键说明

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