Esempio n. 1
0
 //����Ȩ��
 protected void AddPermissionButton_Click(object sender, System.EventArgs e)
 {
     if(this.CategoryList.SelectedIndex>-1)
     {
         int currentRole = Convert.ToInt32(Request["RoleID"]);
         Role bizRole = new Role(currentRole);
         bizRole.AddPermission( Convert.ToInt32(this.CategoryList.SelectedValue) );
         CategoryDownList_SelectedIndexChanged(sender,e);
     }
 }
Esempio n. 2
0
 //增加权限
 protected void AddPermissionButton_Click(object sender, System.EventArgs e)
 {
     int[] items = CategoryList.GetSelectedIndices();
     if (items.Length > 0)
     {
         int currentRole = Convert.ToInt32(Request["RoleID"]);
         Role bizRole = new Role(currentRole);
         foreach (int i in items)
         {
             int permid = Convert.ToInt32(this.CategoryList.Items[i].Value);
             bizRole.AddPermission(permid);
         }
     }
     CategoryDownList_SelectedIndexChanged(sender, e);
 }