return;
}
string[] cdbm = lc_cdbms.Split('*');
int ln_cdsl = cdbm.Length;
MenuItem[] cdmc1 = new MenuItem[30]; //一级菜单项名称数组
MenuItem[] cdmc2 = new MenuItem[200]; //二级菜单项名称数组
MenuItem[] cdmc3 = new MenuItem[300]; //三级菜单项名称数组
string[] cdbm1 = new string[30]; //一级菜单索引号数组
string[] cdbm2 = new string[200]; //二级菜单索引号数组
string[] cdbm3 = new string[300]; //三级菜单索引号数组
int[] cdbj1 = new int[30]; //一级菜单权限标记
int[] cdbj2 = new int[200]; //二级菜单权限标记
int[] cdbj3 = new int[300]; //三级菜单权限标记
int x2 = 0;
int x3 = 0;
XElement xmlFile = XElement.Load(@"ftp://100.100.0.1/yhcd1/XMLCdsj.xml");
//根据 XMLCdsj.xml为数组赋值
foreach (var p in xmlFile.Elements("cdbm"))
{
switch (p.Value.ToString().Length)
{
case 1:
cdmc1[x1] = new MenuItem((string)p.Attribute("cdmc"));
for (int i = 0; i <= ln_cdsl - 1; i++)
{
if (p.Value.ToString() == cdbm[i])
{
cdbj1[x1] = 1; //为菜单权限数组打标记1可显示
break; //0 为隐藏
}
else
{
cdbj1[x1] = 0;
}
|