📄 dd_listall.aspx.cs
字号:
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 DepartmentDecision_DD_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 LinkButton1_Command(object sender, CommandEventArgs e)
{
Response.Redirect("DD_Info.aspx?ddid="+e.CommandArgument);
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("DD_ListAll.aspx?did=" + this.DropDownList1.SelectedValue);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -