order_listall.aspx.cs

来自「网络企业信息管理系统」· CS 代码 · 共 50 行

CS
50
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class OrderInfo_Order_ListAll : System.Web.UI.Page
{
    WebService webService = new WebService();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserID"] == null || Session["UserLevel"] == null)
        {
            Response.Redirect("~/Error.aspx");
        }
        if (Session["UserLevel"].ToString() != "总经理" && Session["UserLevel"].ToString() != "副总经理")
        {
            Response.Redirect("~/Error.aspx");
        }
        if (!Page.IsPostBack)
        {
            string strSql = "Select * from z_Department";
            DataTable dtTable = webService.ExcuteSelect(strSql);
            this.DropDownList1.DataSource = dtTable.DefaultView;
            this.DropDownList1.DataBind();
            if (Request.QueryString["did"] == null)
            {
                this.DropDownList1.SelectedValue = "1";
            }
            else
                this.DropDownList1.SelectedValue = Request.QueryString["did"];
            this.lblDept.Text = this.DropDownList1.SelectedItem.Text;
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("Order_ListAll.aspx?did="+this.DropDownList1.SelectedValue);
    }
    protected void LinkButton1_Command(object sender, CommandEventArgs e)
    {
        Response.Redirect("Order_Info.aspx?oid="+e.CommandArgument);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?