📄 bigcustomerok.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 金利来分销管理系统.BigCustomers
{
public partial class BigCustomerOK : System.Web.UI.Page
{
BLL.BigCustomers.bigclientBll bigclientbllshow;
BLL.BigCustomers.bigclient_listBll bigclient_listbllshow;
BLL.Employee.EmployeeBll employeebllshow;
public BigCustomerOK()
{
bigclientbllshow = new BLL.BigCustomers.bigclientBll();
bigclient_listbllshow = new BLL.BigCustomers.bigclient_listBll();
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(), "2") == true)
{
//将采购单据的编号添加到DropDownList里
List<Model.BigCustomers.bigclientModel> bigclient = bigclientbllshow.SelectbigclientID("未通过");
foreach (var item in bigclient)
{
this.ddlStockList.Items.Add(item.bigclient_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
{
bigclientbllshow.bigclientUpdate(this.ddlStockList.Text, this.lblStockName.Text, this.rblOK.Text);
Response.Write("<script>alert('该销售单" + this.rblOK.Text + "审核')</script>");
if (this.rblOK.Text == "通过")
{
ddlStockList.Items.Remove(ddlStockList.Text);
this.ddlStockList.SelectedIndex = 0;
}
}
//清空数据
this.gvShow.DataSource = null;
this.gvShow.DataBind();
Server.Transfer("BigCustomerOK.aspx");
}
//通过大客户销售单据查找大客户销售信息
protected void ddlStockList_SelectedIndexChanged(object sender, EventArgs e)
{
Model.BigCustomers.bigclientModel mo = bigclientbllshow.bigclienrSelectByID(this.ddlStockList.Text);
this.lblName.Text = mo.Employee_ID;
this.lblTime.Text = mo.bigclient_time.ToString();
this.lblMonery.Text = mo.bigclient_price.ToString();
}
//查看详情
protected void btnLook_Click(object sender, EventArgs e)
{
if (this.ddlStockList.SelectedValue == "请选择采购单号")
{
Response.Write("<script>alert('请选择采购单号')</script>");
}
else
{
this.gvShow.DataSource = bigclient_listbllshow.bigclient_listSelectByID(this.ddlStockList.Text);
this.gvShow.DataBind();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -