Beispiel #1
0
 private void Loadmenu()
 {
     if (_gtype != 1)
     {
         var list = (from a in db.ESHOP_GROUPs
                     join b in db.GROUP_MENUs on a.GROUP_ID equals b.GROUP_ID
                     join c in db.MENUs on b.MENU_ID equals c.ID
                     where c.MENU_RANK == 1 &&
                     c.MENU_ACTIVE == 1 &&
                     a.GROUP_ID == _gid
                     select c).OrderByDescending(n => n.MENU_ORDER).ToList();
         if (list.Count > 0)
         {
             Rpmenu.DataSource = list;
             Rpmenu.DataBind();
         }
     }
     else
     {
         var list = db.MENUs.Where(n => n.MENU_RANK == 1 && n.MENU_ACTIVE == 1).OrderByDescending(n => n.MENU_ORDER).ToList();
         if (list.Count > 0)
         {
             Rpmenu.DataSource = list;
             Rpmenu.DataBind();
         }
     }
 }
Beispiel #2
0
 protected void Load_Menu1()
 {
     try
     {
         Rpmenu.DataSource = per.Loadmenu(0, 100, 1, 2, -1);
         Rpmenu.DataBind();
     }
     catch (Exception ex)
     {
         clsVproErrorHandler.HandlerError(ex);
     }
 }
Beispiel #3
0
 protected void Load_Menu1()
 {
     try
     {
         int pos   = per.getPosition(_cat_seo_url, _cat_seo_url);
         int _type = per.getType(_cat_seo_url, _cat_seo_url);
         Rpmenu.DataSource = per.Loadmenu_news(pos, 100, 1, _type);
         Rpmenu.DataBind();
     }
     catch (Exception ex)
     {
         clsVproErrorHandler.HandlerError(ex);
     }
 }
 public void Loadmenu_parent()
 {
     try
     {
         var list = db.MENU_PARENTs.Where(n => n.MENU_PAR_ACTIVE == 1 && n.MENU_RANK == 1 && (_gtype != 1 ? listmenuid_cap1().Contains(n.MENU_PAR_ID.ToString()) : _gtype == 1)).OrderByDescending(n => n.ORDERBY).ToList();
         if (list.Count > 0)
         {
             Rpmenu.DataSource = list;
             Rpmenu.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }