public static List<FormFunction> GetFormFunctions() { List<FormFunction> result = new List<FormFunction>(); NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString); var dbFormFunctions = from f in newAppsCnn.Sec_FormFunctions select f; foreach (var dbFormFunction in dbFormFunctions) { FormFunction formFunction = new FormFunction(); formFunction.FromDbFormFunction(dbFormFunction); result.Add(formFunction); } return result; }
private void UpdateMenuItemRights(SecurityTreeNode _node, FormFunction _formFunction,CheckState _checkStatus) { if (AllowRightsUpdates == true && _node != null && CrGroup != null) { if (_checkStatus == CheckState.Checked) { if ((_node.MenuItem.FormAllowedFunctions & _formFunction.FunctionID) > 0) _node.GroupAllowedFunctions += _formFunction.FunctionID; } else { _node.GroupAllowedFunctions -= _formFunction.FunctionID; } var groupRight = CrGroup.GroupRights.Find(g => g.MenuID == _node.Name); if (groupRight != null) groupRight.AllowedFunctions = _node.GroupAllowedFunctions; } }