private void disable_allsubMenu() { ProxyBllSYSTEM_MODULE bllSystemModule = new ProxyBllSYSTEM_MODULE(); DataSet dsModule = bllSystemModule.GetList(" LENGTH(F_MODULE_ID)=5 AND F_DEL=0 "); if (dsModule != null && dsModule.Tables[0].Rows.Count != 0) { for (int i = 0; i < dsModule.Tables[0].Rows.Count; i++) { string tempModuleCode = dsModule.Tables[0].Rows[i]["F_MODULE_NAME"].ToString(); for (int m1 = 0; m1 < ribbonControl1.Pages.Count; m1++) { for (int m2 = 0; m2 < ribbonControl1.Pages[m1].Groups.Count; m2++) { for (int m3 = 0; m3 < ribbonControl1.Pages[m1].Groups[m2].ItemLinks.Count; m3++) { if (tempModuleCode.Equals(ribbonControl1.Pages[m1].Groups[m2].ItemLinks[m3].Caption)) { ribbonControl1.Pages[m1].Groups[m2].ItemLinks[m3].Item.Enabled = false; } } } } } } return; }