private int CalcAccessLevel() { int intAccessLevel = 0; foreach (CheckBox chkBox in clbModules.Items) { if (clbModules.GetItemCheckState(clbModules.Items.IndexOf(chkBox)) == CheckState.Checked) { intAccessLevel += SecurityTools.GetSecGroupValue(chkBox.Name); } } return(intAccessLevel); }