SVN r760
SVN-Revision: r760
This commit is contained in:
@@ -94,14 +94,24 @@ namespace Lskj.Control.Model
|
|||||||
List<string> roleNamesList = new List<string>();
|
List<string> roleNamesList = new List<string>();
|
||||||
foreach (ToolStripItem cms in cmsMenu.Items)
|
foreach (ToolStripItem cms in cmsMenu.Items)
|
||||||
{
|
{
|
||||||
GridRightMenuModel model = cms.Tag as GridRightMenuModel;
|
if (cms.Tag is GridRightMenuModel model)
|
||||||
|
{
|
||||||
cmsModelDic[cms] = model;
|
cmsModelDic[cms] = model;
|
||||||
roleNamesList.Add(model.PrivilegeOper);
|
roleNamesList.Add(model.PrivilegeOper);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 判断右键菜单是否可用
|
// 判断右键菜单是否可用
|
||||||
foreach (ToolStripItem cms in cmsMenu.Items)
|
foreach (ToolStripItem cms in cmsMenu.Items)
|
||||||
{
|
{
|
||||||
GridRightMenuModel model = cmsModelDic.ContainsKey(cms) ? cmsModelDic[cms] : cms.Tag as GridRightMenuModel;
|
GridRightMenuModel model = null;
|
||||||
|
if (cmsModelDic.ContainsKey(cms))
|
||||||
|
{
|
||||||
|
model = cmsModelDic[cms];
|
||||||
|
}
|
||||||
|
else if (cms.Tag is GridRightMenuModel gridRightMenuModel)
|
||||||
|
{
|
||||||
|
model = gridRightMenuModel;
|
||||||
|
}
|
||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(model.MenuCond))
|
if (!string.IsNullOrWhiteSpace(model.MenuCond))
|
||||||
|
|||||||
Reference in New Issue
Block a user