protected void LoadMenuGroupsByMenuAppAndType() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuGroupsByMenuAppAndType(menuForAppDropDownList.SelectedValue.Trim(), menuTypeDropDownList.SelectedValue.Trim()); menuGroupDropDownList.DataSource = dt; menuGroupDropDownList.DataValueField = "MenuGroupId"; menuGroupDropDownList.DataTextField = "MenuGroupName"; menuGroupDropDownList.DataBind(); menuGroupDropDownList.Items.Insert(0, ""); menuGroupDropDownList.SelectedIndex = 0; if (dt.Rows.Count > 1) { menuGroupDropDownList.SelectedIndex = 1; userMenuPane.Visible = true; GetMenuListToPrivilegeUser(); GetPrivilegedMenuByUserGroup(); } } 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();"); } }
protected void LoadMenuGroupsByMenuAppAndType() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuGroupsByMenuAppAndType(menuForAppDropDownList.SelectedValue.Trim(), menuTypeDropDownList.SelectedValue.Trim()); menuGroupDropDownList.DataSource = dt; menuGroupDropDownList.DataValueField = "MenuGroupId"; menuGroupDropDownList.DataTextField = "MenuGroupName"; menuGroupDropDownList.DataBind(); menuGroupDropDownList.Items.Insert(0, "----------Select----------"); menuGroupDropDownList.Items.Insert(1, "All"); menuGroupDropDownList.SelectedIndex = 0; } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; msgbox.Attributes.Add("Class", "alert alert-warning"); } finally { appMenu = null; } }
protected void GetMenuGroupListByMenuAppAndType() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuGroupsByMenuAppAndType(menuForAppDropDownList.SelectedValue.Trim(), menuTypeDropDownList.SelectedValue.Trim()); menuGroupListGridView.DataSource = dt; menuGroupListGridView.DataBind(); if (menuGroupListGridView.Rows.Count > 0) { menuGroupListGridView.UseAccessibleHeader = true; menuGroupListGridView.HeaderRow.TableSection = TableRowSection.TableHeader; } if (dt.Rows.Count < 1) { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; msgbox.Attributes.Add("Class", "alert alert-warning"); } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; msgbox.Attributes.Add("Class", "alert alert-warning"); } finally { appMenu = null; } }