📄 branchstoreareturnselect.aspx.cs
字号:
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 WebApplication1
{
public partial class BranchStoreaReturnSelect : System.Web.UI.Page
{
BLL.Branch.VenditionBll BranchReturnSelect;
BLL.Employee.EmployeeBll employeebllshow;
public BranchStoreaReturnSelect()
{
BranchReturnSelect = new BLL.Branch.VenditionBll();
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(), "55") == true)
{
BindData();
}
else
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
}
private void BindData()
{
//退货信息显示
gvBranchReturnSelectShow.DataSource = BranchReturnSelect.SelectBranchReturn();
gvBranchReturnSelectShow.DataBind();
}
//查询
protected void btnBranchReturnSelectSS_Click(object sender, EventArgs e)
{
ShowMethod();
}
//显示
private void ShowMethod()
{
if (this.ddlBranchReturnSelectXZSSTJ.Text == "分店名称")
{
gvBranchReturnSelectShow.DataSource = BranchReturnSelect.SelectBranchShopname(this.txtBranchReturnSelectCXData.Text);
gvBranchReturnSelectShow.DataBind();
}
else if (this.ddlBranchReturnSelectXZSSTJ.Text == "商品名称")
{
gvBranchReturnSelectShow.DataSource = BranchReturnSelect.SelectBranchproductnames(this.txtBranchReturnSelectCXData.Text.ToString());
gvBranchReturnSelectShow.DataBind();
}
else
{
BindData();
}
}
//分页
protected void gvBranchReturnSelectShow_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.gvBranchReturnSelectShow.PageIndex = e.NewPageIndex;
ShowMethod();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -