private void LoadLtsBox() { //string userID = Request.Params.Get("id"); string userID = Session["id"] != null ? Session["id"].ToString() : ""; //khoi tao bien secu de lay toan bo roles cua thang hien tai lstRoles.Items.Clear(); lstCat.Items.Clear(); lstPer.Items.Clear(); MainSecurity objscu = new MainSecurity(); DataTable dt = objscu.GetRoleAsTableNoCache(userID, 1); if (dt.Rows.Count > 0) { lstRoles.DataSource = dt; lstRoles.DataTextField = "Role_Name"; lstRoles.DataValueField = "Role_ID"; lstRoles.DataBind(); } //lay thong tin ve chuyen muc cua thang hien tai dt = objscu.getParentCategoryAssigned(userID, 1); if (dt.Rows.Count > 0) { lstCat.DataTextField = "Cat_Name"; lstCat.DataValueField = "Cat_ID"; lstCat.DataSource = dt; lstCat.DataBind(); } //lay thong tin ve toan bo quyen dt = objscu.GetPermissionAsTable(userID, 1, -1); if (dt.Rows.Count > 0) { lstPer.DataSource = dt; lstPer.DataTextField = "Permission_Name"; lstPer.DataValueField = "Permission_ID"; lstPer.DataBind(); } }