private void PopulateAllMenu() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetAllMenuData(menuForAppDropDownList.SelectedValue.Trim(), menuTypeDropDownList.SelectedValue.Trim()); if (dt.Rows.Count > 0) { testAllMenu.Items.Clear(); AddTopMenuItems(dt); } else { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { appMenu = null; } }
private void PopulateAllMenu() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetAllMenuData(menuForAppDropDownList.SelectedValue.Trim(), menuTypeDropDownList.SelectedValue.Trim()); if (dt.Rows.Count > 0) { testAllMenu.Items.Clear(); AddTopMenuItems(dt); } else { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { appMenu = null; } }
private void PopulateUserMenuForDeveloper(string menufor) { AppMenuBLL appMenu = new AppMenuBLL(); string appmenu = ""; try { if ((string)LumexSessionManager.Get("isMenu") == "N") { if (menufor == "inv") { appmenu = "Inventory"; } else if (menufor == "acc") { appmenu = "Accounts"; } else if (menufor == "stn") { appmenu = "Settings"; } ParentLevelMenuItems.Clear(); usermenu = new DataTable(); DataTable dtUserMenu = appMenu.GetAllMenuData(appmenu, "Sideber"); usermenu = dtUserMenu; if (dtUserMenu.Rows.Count > 0) { // ainMenu.Items.Clear(); // AddTopMenuItems(dtUserMenu); getParentMenulist(dtUserMenu); ParentLevelMenuRepeater.DataSource = ParentLevelMenuItems; ParentLevelMenuRepeater.DataBind(); } if (menufor == "inv") { LumexSessionManager.Add("menuinv", dtUserMenu); } else if (menufor == "acc") { LumexSessionManager.Add("menuacc", dtUserMenu); } else if (menufor == "stn") { LumexSessionManager.Add("menustn", dtUserMenu); } // LumexSessionManager.Add("IsMenu", "Y"); } else if ((string)LumexSessionManager.Get("isMenu") == "Y") { // usermenu = new DataTable(); // usermenu = (DataTable)LumexSessionManager.Get("Menudata"); getParentMenulist(usermenu); ParentLevelMenuRepeater.DataSource = ParentLevelMenuItems; ParentLevelMenuRepeater.DataBind(); } } catch (Exception) { } finally { appMenu = null; } }