Exemplo n.º 1
0
 protected void EgvRoleView_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         RoleInfo dataItem = (RoleInfo)e.Row.DataItem;
         CheckBox box      = (CheckBox)e.Row.FindControl("ChkSpecialInput");
         CheckBox box2     = (CheckBox)e.Row.FindControl("ChkSpecialManage");
         IList <RoleSpecialPermissionsInfo> specialPermssionList = RolePermissions.GetSpecialPermssionList(dataItem.RoleId, BasePage.RequestInt32("SpecialID"));
         bool flag = false;
         foreach (RoleSpecialPermissionsInfo info2 in specialPermssionList)
         {
             flag = info2.SpecialId != -1;
             if (info2.OperateCode == OperateCode.SpecialContentInput)
             {
                 box.Checked = true;
                 if (!flag)
                 {
                     box.Enabled = flag;
                 }
             }
             if (info2.OperateCode == OperateCode.SepcialContentManage)
             {
                 box2.Checked = true;
                 if (!flag)
                 {
                     box2.Enabled = flag;
                 }
             }
         }
     }
 }