/// <summary> /// 设置权限表 /// </summary> /// <param name="cbl"></param> /// <param name="roleid"></param> public void checkRank(CheckBoxList cbl, int roleid) { for (int i = 0; i < cbl.Items.Count; i++) { int v = int.Parse(cbl.Items[i].Value); if (cbl.Items[i].Selected) { RankService.AddRank(v, int.Parse(Request["roleid"])); } else { RankService.DeleteRank(v, roleid); } } }