using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using DSWeb.EntityDA; using System.Text; namespace DSWeb.Authority { public partial class AuthorityList : System.Web.UI.Page { private const string strSql = "SELECT D.GID,D.STATE,D.NAME,D.DESCRIPTION,E.NAME as ROLENAME,E.DESCRIPTION as ROLEDESCRIPTION FROM " + " (SELECT A.GID,A.STATE,B.NAME,B.DESCRIPTION,C.ROLEID from action as A " + " INNER JOIN sys_module as B ON A.MODULEID = B.GID " + " INNER JOIN action_role as C ON A.GID = C.ACTIONID) as D " + " INNER JOIN role as E ON D.ROLEID = E.GID "; // "SELECT A.GID,A.NAME,A.DESCRIPTION,A.STATE,A.SORT,B.USERNAME AS CreateUserName,'../roles/edit.aspx?handle=edit&id=' as OpenHandle // FROM role AS A LEFT JOIN user as B ON A.CREATEUSER = B.GID "; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.wucGridView1.gvBind(strSql); GridView gView = (GridView)this.wucGridView1.Controls[0].FindControl("GridView1"); //gView.cou } if (Request.QueryString["getinfo"] != null) { GetInfo(strSql); Response.End(); } if (Request.QueryString["refresh"] != null) { wucGridView1.gvBind(strSql); Response.End(); } } private void GetInfo(string sql) //右键详细菜单函数 { int id = 0; if (!int.TryParse(Request.QueryString["id"], out id)) { Response.Write("error"); return; } //string sql = "select * from price_cust where pcid=" + id.ToString(); DataTable dt = DB.GetTable(sql); if (dt.Rows.Count == 0) { Response.Write("error"); return; } DataRow row = dt.Rows[0]; StringBuilder sb = new StringBuilder(); sb.Append(""); sb.AppendFormat(""); sb.AppendFormat("", row["GID"]); sb.AppendFormat("", row["USERNAME"]); sb.AppendFormat("", row["CODENAME"]); sb.AppendFormat("", row["PASSWORD"]); sb.Append("
详细信息
ID:{0}
报价单号:{0}
客户名称:{0}
录入人:{0}
"); Response.Write(sb.ToString()); } } }