温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:网上办公系统源码
当前文件路径:OfficeOnline/ClientInfo/Client_Info.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_Info : System.Web.UI.Page 13
{ 14
WebService webService = new WebService(); 15
protected void Page_Load(object sender, EventArgs e) 16
{ 17
//if (Session["UserID"] == null || Session["UserLevel"] == null) 18
//{ 19
// Response.Redirect("~/Error.aspx"); 20
//} 21
string strSql = "SELECT z_Client.Client_ID,z_Client.Client_IsConfirm, z_Client.Client_AddDate,z_Client.Dept_ID, z_Client.Client_CompanyName, z_Client.Client_AgentName, z_Client.Client_Phone, z_Client.Client_Email, z_Client.Client_WebSite, z_Client.Client_ConfirmDate, z_Client.Client_AddPersonID, z_Person.Person_ID, z_Person.Person_RealName FROM z_Client INNER JOIN z_Person ON z_Client.Client_AddPersonID = z_Person.Person_ID WHERE z_Client.Client_ID='" + Request.QueryString["cid"] + "';"; 22
DataTable table = webService.ExcuteSelect(strSql); 23
strSql = "Select Person_DeptID from z_Person where Person_ID='" + Session["UserID"].ToString() + "';"; 24
DataTable dtTable = webService.ExcuteSelect(strSql); 25
if (dtTable.Rows[0]["Person_DeptID"].ToString() != table.Rows[0]["Dept_ID"].ToString()) 26
{ 27
Response.Redirect("~/Error.aspx"); 28
} 29
if (table.Rows[0]["Client_IsConfirm"].ToString() == "False") 30
{ 31
Response.Redirect("~/Error.aspx"); 32
} 33
this.lblAddDate.Text = table.Rows[0]["Client_AddDate"].ToString(); 34
this.lblAddPersonName.Text = table.Rows[0]["Person_RealName"].ToString(); 35
this.lblAgentName.Text = table.Rows[0]["Client_AgentName"].ToString(); 36
this.lblCompanyName.Text = table.Rows[0]["Client_CompanyName"].ToString(); 37
this.lblConfirmDate.Text = table.Rows[0]["Client_ConfirmDate"].ToString(); 38
this.lblEmail.Text = table.Rows[0]["Client_Email"].ToString(); 39
this.lblPhone.Text = table.Rows[0]["Client_Phone"].ToString(); 40
this.lblWeb.Text = table.Rows[0]["Client_WebSite"].ToString(); 41
if (Session["UserLevel"].ToString() == "总经理" || Session["UserLevel"].ToString() == "副总经理") 42
{ 43
this.HyperLink1.NavigateUrl = "Client_ListAll.aspx?did=" + table.Rows[0]["Dept_ID"].ToString(); 44
} 45
else 46
this.HyperLink1.NavigateUrl = "Client_List.aspx"; 47
} 48
} 49




WebService webService 
}
}