selectbranchdetail.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 Enterprise_management
{
public partial class SelectBranchDetail : System.Web.UI.Page
{
//实例化BLL层
BLL.Branch.ShopBll ShopDatail;
BLL.Employee.EmployeeBll employeebllshow;
public SelectBranchDetail()
{
ShopDatail = new BLL.Branch.ShopBll();
employeebllshow = new BLL.Employee.EmployeeBll();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
//用户权限
if (Session["employee_id"] == null)
{
Response.Write ("请您登陆系统");
}
else
{
if (employeebllshow.UserRole(Session["role_id"].ToString(), "59") == true)
{
//通过参数跳个人详细信息
this.gvBranchDetail.DataSource = ShopDatail.BranchSelectDetail(int.Parse(Request.QueryString["shop_id"]));
this.gvBranchDetail.DataBind();
}
else
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?