📄 addbranches.aspx.cs
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
namespace 金利来_转aspx_
{
public partial class AddBranches : System.Web.UI.Page
{
BLL.Branch.ShopBll branchadd ;
BLL.Employee.EmployeeBll employeebllshow;
public AddBranches()
{
branchadd = 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("<script>alert('请您登陆系统');location.href='../Enter.aspx'</script>");
}
else
{
if (employeebllshow.UserRole(Session["role_id"].ToString(), "51") == false )
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
}
protected void btnOk_Click(object sender, EventArgs e)
{
//添加分店信息
branchadd.BranchAdd( this.txtBranchName.Text, this.txtBranchUnMan.Text, this.txtBranchAddress.Text, this.txtBranchTel.Text);
Response.Write("<script>alert('添加成功');</script>");
Response.Redirect("SelectBranchs.aspx");
}
//取消时
protected void btnEsc_Click(object sender, EventArgs e)
{
this.txtBranchName.Text = "";
this.txtBranchUnMan.Text = "";
this.txtBranchAddress.Text = "";
this.txtBranchTel.Text = "";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -