client_info.aspx.cs

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

CS
49 行
字号
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 ClientInfo_Client_Info : 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");
        }
        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"] + "';";
        DataTable table = webService.ExcuteSelect(strSql);
        strSql = "Select Person_DeptID from z_Person where Person_ID='" + Session["UserID"].ToString() + "';";
        DataTable dtTable = webService.ExcuteSelect(strSql);
        if (dtTable.Rows[0]["Person_DeptID"].ToString() != table.Rows[0]["Dept_ID"].ToString())
        {
            Response.Redirect("~/Error.aspx");
        }
        if (table.Rows[0]["Client_IsConfirm"].ToString() == "False")
        {
            Response.Redirect("~/Error.aspx");       
        }
        this.lblAddDate.Text = table.Rows[0]["Client_AddDate"].ToString();
        this.lblAddPersonName.Text = table.Rows[0]["Person_RealName"].ToString();
        this.lblAgentName.Text = table.Rows[0]["Client_AgentName"].ToString();
        this.lblCompanyName.Text = table.Rows[0]["Client_CompanyName"].ToString();
        this.lblConfirmDate.Text = table.Rows[0]["Client_ConfirmDate"].ToString();
        this.lblEmail.Text = table.Rows[0]["Client_Email"].ToString();
        this.lblPhone.Text = table.Rows[0]["Client_Phone"].ToString();
        this.lblWeb.Text = table.Rows[0]["Client_WebSite"].ToString();
        if (Session["UserLevel"].ToString() == "总经理" || Session["UserLevel"].ToString() == "副总经理")
        {
            this.HyperLink1.NavigateUrl = "Client_ListAll.aspx?did=" + table.Rows[0]["Dept_ID"].ToString();
        }
        else
            this.HyperLink1.NavigateUrl = "Client_List.aspx";
    }
}

⌨️ 快捷键说明

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