/// <summary>
 /// 获得选中的菜单权限列表
 /// </summary>
 /// <param name="_treenode"></param>
 /// <param name="_pers"></param>
 private void GetSelecttNodeCheckedState(TreeNode _treenode, List <Model.PermissionInfo> _persList)
 {
     if (_treenode.Checked && _treenode.Tag != null)
     {
         Model.PermissionInfo _pers = new Model.PermissionInfo();
         _pers.moduleInfoID = Convert.ToInt32(_treenode.Tag);
         _pers.userName     = _SelUser.userName;
         _persList.Add(_pers);
     }
     if (_treenode.Nodes != null && _treenode.Nodes.Count > 0)
     {
         foreach (TreeNode _node in _treenode.Nodes)
         {
             GetSelecttNodeCheckedState(_node, _persList);
         }
     }
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(KPS.Model.PermissionInfo model)
 {
     return(dal.Add(model));
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(KPS.Model.PermissionInfo model)
 {
     return(dal.Update(model));
 }
Example #4
0
 /// <summary>
 /// 获得选中的菜单权限列表
 /// </summary>
 /// <param name="_treenode"></param>
 /// <param name="_pers"></param>
 private void GetSelecttNodeCheckedState(TreeNode _treenode,List<Model.PermissionInfo> _persList)
 {
     if (_treenode.Checked && _treenode.Tag != null)
     {
         Model.PermissionInfo _pers=new Model.PermissionInfo();
         _pers.moduleInfoID=Convert.ToInt32(_treenode.Tag);
         _pers.userName = _SelUser.userName;
         _persList.Add(_pers);
     }
     if (_treenode.Nodes != null && _treenode.Nodes.Count > 0)
     {
         foreach (TreeNode _node in _treenode.Nodes)
         {
             GetSelecttNodeCheckedState(_node, _persList);
         }
     }
 }