PURVIEW_USER_INITIAL.ASPX: User Permissions Initialization, the user data table system function data table is used to make the card set, and deposit the permissions allocation database.
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls Using system.web.ui.htmlcontrols; using microsoft.web.ui.webControls;
Namespace Yljweb._admin.purview_manage {///
Private void page_load (object sender, system.eventargs e) {// Place user code here to initialize page if (! page.ispostback) // is the first to respond to the client or whether it is the first visit, The system automatically generates {bindtreeViewall ();}}
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} ///
} #Endregion
private void BindTreeViewAll () {string str_Sql = "select * from Purview_All order by order_id"; if (YljWeb.Classes.SqlConn.IsExist (str_Sql)) // tree traversal {tree.BindTreeViewShow ( "nodeid", "parentid", " location "," mytext ", str_Sql, lbl_Curnodeid, TreeViewAll);}} private void btn_Purview_Initial_Click (object sender, System.EventArgs e) {this.lbl_mesg.Text ="! user rights system is initializing operation, please wait " ; // Clear the list of permissions string strSql_Clear = "Delete from Purview_User_Have"; YljWeb.Classes.SqlConn.ExecuteSql (strSql_Clear); // find out all users string strSql_User = "Select * from AdminUser"; DataSet ds_user = new DataSet () DS_USER = YLJWEB.CLASS.SQLCONN.EXECUtesqlFordataset (strsql_user); if (DS_USER.TABLES [0] .Rows.count> 0) {for (int i = 0; i /// Combined user permission list item / if (DS_PURVIEW.TABLES [0] .Rows.count> 0) {for (int J = 0; j