📄 branchreturnok.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 金利来分销管理系统.Branch
{
public partial class BranchReturnOK : System.Web.UI.Page
{
//实例化BLL层
BLL.Branch.VenditionBll venditionbllshow;
BLL.Employee.EmployeeBll employeebllshow;
public BranchReturnOK()
{
venditionbllshow = 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("<script>alert('请您登陆系统');location.href='../Enter.aspx'</script>");
}
else
{
if (employeebllshow.UserRole(Session["role_id"].ToString(), "52") == true)
{
this.lblStockName.Text = Session["employee_id"].ToString();
//查找“未通过”审核的分店退货单据编号
List<Model.Branch.VenditionModel> vendition =venditionbllshow.SelectvenditionID("未通过");
foreach (var item in vendition)
{
this.ddlStockList.Items.Add(item.vendition_id);
}
}
else
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
}
//确定审核
protected void btnSure_Click(object sender, EventArgs e)
{
if (this.ddlStockList.SelectedValue == "请选择单据号")
{
Response.Write("<script>alert('请选择单据号')</script>");
}
else
{
venditionbllshow.venditionUpdate(this.ddlStockList.Text, this.lblStockName.Text, this.rblOK.Text);
Response.Write("<script>alert('该单据" + this.rblOK.SelectedValue + "审核')</script>");
if (this.rblOK.Text == "通过")
{
ddlStockList.Items.Remove(ddlStockList.Text);
this.ddlStockList.SelectedIndex = 0;
}
}
}
//查看详情
protected void btnSelect_Click(object sender, EventArgs e)
{
this.gvShow.DataSource = venditionbllshow.venditionByIDSelect(this.ddlStockList.Text);
this.DataBind();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -