protected void LoadMenuTypesByApp() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuTypesByApp(menuForAppDropDownList.SelectedValue.Trim()); menuTypeDropDownList.DataSource = dt; menuTypeDropDownList.DataValueField = "MenuType"; menuTypeDropDownList.DataTextField = "MenuType"; menuTypeDropDownList.DataBind(); if (dt.Rows.Count == 1) { //menuTypeDropDownList.SelectedIndex = 0; } else { menuTypeDropDownList.Items.Insert(0, "----------Select----------"); menuTypeDropDownList.SelectedIndex = 0; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { appMenu = null; } }
protected void LoadMenuTypesByApp() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuTypesByApp(menuForAppDropDownList.SelectedValue.Trim()); menuTypeDropDownList.DataSource = dt; menuTypeDropDownList.DataValueField = "MenuType"; menuTypeDropDownList.DataTextField = "MenuType"; menuTypeDropDownList.DataBind(); if (dt.Rows.Count == 1) { menuTypeDropDownList.SelectedIndex = 0; LoadMenuGroupsByMenuAppAndType(); PopulateUserMenu(); } else { menuTypeDropDownList.Items.Insert(0, ""); menuTypeDropDownList.SelectedIndex = 0; } } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { appMenu = null; MyAlertBox("MyOverlayStop();"); } }