Beispiel #1
0
        protected void lstRoles_SelectedIndexChanged(object sender, EventArgs e)
        {
            //string userid=Request.Params.Get("id");
            string       userid = Session["id"] != null ? Session["id"].ToString() : "";
            MainSecurity objscu = new MainSecurity();

            //lay thong tin ve chuyen muc cua thang hien tai
            lstCat.DataTextField  = "Cat_Name";
            lstCat.DataValueField = "Cat_ID";
            lstCat.DataSource     = objscu.GetCategoryByRoleAsTable(userid, Int32.Parse(lstRoles.SelectedValue));
            lstCat.DataBind();
            //lay thong tin ve toan bo quyen
            lstPer.DataSource     = objscu.GetPermissionAsTable(userid, 1, -1);
            lstPer.DataTextField  = "Permission_Name";
            lstPer.DataValueField = "Permission_ID";
            lstPer.DataBind();
        }