protected void EgvRoleView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { CheckBox box = (CheckBox)e.Row.FindControl("ChkNodePreview"); CheckBox box2 = (CheckBox)e.Row.FindControl("ChkNodeInput"); CheckBox box3 = (CheckBox)e.Row.FindControl("ChkNodeCheck"); CheckBox box4 = (CheckBox)e.Row.FindControl("ChkContentManage"); CheckBox box5 = (CheckBox)e.Row.FindControl("ChkNodeManage"); CheckBox box6 = (CheckBox)e.Row.FindControl("ChkCommentManage"); RoleInfo dataItem = (RoleInfo)e.Row.DataItem; foreach (RoleNodePermissionsInfo info2 in RolePermissions.GetAllNodePermissionsById(dataItem.RoleId, BasePage.RequestInt32("NodeId"))) { bool flag = info2.NodeId != -1; if (info2.OperateCode == OperateCode.NodeContentPreview) { box.Checked = true; if (!flag) { box.Enabled = flag; } } if (info2.OperateCode == OperateCode.NodeContentInput) { box2.Checked = true; if (!flag) { box2.Enabled = flag; } } if (info2.OperateCode == OperateCode.NodeContentCheck) { box3.Checked = true; if (!flag) { box3.Enabled = flag; } } if (info2.OperateCode == OperateCode.ChildNodesManage) { box5.Checked = true; if (!flag) { box5.Enabled = flag; } } if (info2.OperateCode == OperateCode.NodeContentManage) { box4.Checked = true; if (!flag) { box4.Enabled = flag; } } if (info2.OperateCode == OperateCode.NodeCommentManage) { box6.Checked = true; if (!flag) { box6.Enabled = flag; } } } } }