public ActionResult Index()
 {
     if (System.Web.HttpContext.Current.Session["UIConvert"] == null)
     {
         var area = new AreaDb();
         ViewBag.areaList = area.GetAll();
         // Lay danh sach chuyen muc
         var menu             = new MenuDb();
         var listAll          = menu.GetAll();
         var listAfterConvert = BdsCommon.GetTree(listAll, 0);
         BdsCommon.GetMenuUlTag(listAfterConvert);
         BdsCommon.GetMenuSelectTag(listAfterConvert);
         //Common.SaveDataToResource("NavCategory", Common.ListMenuSelectTag.ToString());
         ViewBag.categoryList = BdsCommon.ListMenuSelectTag.ToString();
     }
     return(View());
 }
        /// <summary>
        /// Refresh menu
        /// </summary>
        private void RefreshMenu()
        {
            var menuDb = new MenuDb();

            //Update menu again
            BdsCommon.ListMenuUlTag.Clear();
            BdsCommon.ListMenuSelectTag.Clear();
            BdsCommon.ListMenuBasic.Clear();
            var list             = menuDb.GetAll();
            var listAfterConvert = BdsCommon.GetTree(list, 0);

            BdsCommon.GetMenuUlTag(listAfterConvert);
            BdsCommon.GetMenuSelectTag(listAfterConvert);
            BdsCommon.GetMenuList(listAfterConvert);
            System.Web.HttpContext.Current.Session["UIConvert"] = BdsCommon.ListMenuUlTag.ToString();
            System.Web.HttpContext.Current.Session["UIMenu"]    = BdsCommon.ListMenuSelectTag.ToString();
        }