Exemple #1
0
 private void LoadMenuItemDetails(MenuEntityItem itemParent, NavBarGroup menuItemParent)
 {
     List<MenuEntityItem> details = new MenuEntityItemLogic().GetAllByParent(itemParent.MenuEntityItemId);
     foreach (MenuEntityItem item in details)
     {
         NavBarItem menuItem = new NavBarItem();
         menuItem.Text = item.Name;
         if (!string.IsNullOrEmpty(item.PagePath) && item.PagePath != "#")
             menuItem.NavigateUrl = item.PagePath;
         menuItemParent.Items.Add(menuItem);
     }
 }
Exemple #2
0
 private void LoadMenuItemDetails(MenuEntityItem itemParent, DevExpress.Web.ASPxMenu.MenuItem menuItemParent)
 {
     List<MenuEntityItem> details = new MenuEntityItemLogic().GetAllByParent(itemParent.MenuEntityItemId);
     foreach (MenuEntityItem item in details)
     {
         DevExpress.Web.ASPxMenu.MenuItem menuItem = new DevExpress.Web.ASPxMenu.MenuItem();
         menuItem.Text = item.Name;
         menuItem.Name = item.MenuEntityItemId.ToString();
         if (!string.IsNullOrEmpty(item.PagePath) && item.PagePath != "#")
             menuItem.NavigateUrl = item.PagePath;
         menuItemParent.Items.Add(menuItem);
     }
 }
Exemple #3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     bool IsSaved;
     GetFormValues();
     if (Request.QueryString["ID"] != null)
     {
         IsSaved = new MenuEntityItemLogic().Update(_Menu, Convert.ToInt32(Request.QueryString["ID"]));
     }
     else
     {
         IsSaved = new MenuEntityItemLogic().Insert(_Menu);
     }
     if (IsSaved)
         Response.Redirect("Default.aspx");
 }
Exemple #4
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     bool IsSaved;
     GetFormValues();
     if (Request.QueryString["Code"] != null)
     {
         IsSaved = new MenuEntityItemLogic().Update(_Menu, Convert.ToInt32(Request.QueryString["Code"]));
     }
     else
     {
         IsSaved = new MenuEntityItemLogic().Insert(_Menu);
     }
     if (IsSaved)
     {
         Session["Notification"] = "success";
         Response.Redirect("Default.aspx?Code=" + Request.QueryString["menu"]);
     }
 }