温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:网上办公系统源码
当前文件路径:OfficeOnline/ClientInfo/Client_ListAll.aspx.cs

1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
12
public partial class ClientInfo_Client_ListAll : System.Web.UI.Page 13
{ 14
WebService webService = new WebService(); 15
protected void Page_Load(object sender, EventArgs e) 16
{ 17
// Response.Write("Session是:"+Session["UserLevel"]); 18
19
//if (Session["UserID"] == null || Session["UserLevel"] == null) 20
//{ 21
// Response.Redirect("~/Error.aspx"); 22
//} 23
//if (Session["UserLevel"] != "总经理" && Session["UserLevel"] != "副总经理") 24
//{ 25
// Response.Redirect("~/Error.aspx"); 26
//} 27
if (!Page.IsPostBack) 28
{ 29
string strSql = "Select * from z_Department"; 30
DataTable dtTable = webService.ExcuteSelect(strSql); 31
this.DropDownList1.DataSource = dtTable.DefaultView; 32
this.DropDownList1.DataBind(); 33
if (Request.QueryString["did"] == null) 34
{ 35
this.DropDownList1.SelectedValue = "1"; 36
} 37
else 38
this.DropDownList1.SelectedValue = Request.QueryString["did"]; 39
this.lblDept.Text = this.DropDownList1.SelectedItem.Text; 40
} 41
} 42
protected void Button1_Click(object sender, EventArgs e) 43
{ 44
Response.Redirect("Client_ListAll.aspx?did=" + this.DropDownList1.SelectedValue); 45
} 46
protected void LinkButton1_Command(object sender, CommandEventArgs e) 47
{ 48
Response.Redirect("Client_Info.aspx?cid="+e.CommandArgument); 49
} 50
} 51




WebService webService 
}
}