Ejemplo n.º 1
0
 public ResultInfo UpdateNavigation(Navigation navigation)
 {
     if (navigation.Id <= 0)
         return new ResultInfo(0, "未找到相应的菜单项!");
     var config = _utils.Get();
     var nav = config.Navigations.FirstOrDefault(t => t.Id == navigation.Id);
     if (nav == null)
         return new ResultInfo(0, "未找到相应的菜单项!");
     navigation.Icon = Utils.UrlDecode(navigation.Icon, Encoding.UTF8);
     var index = config.Navigations.IndexOf(nav);
     config.Navigations[index] = navigation;
     _utils.Set(config);
     return new ResultInfo(1);
 }
Ejemplo n.º 2
0
 public JsonResult UpdateNavigation(Navigation info)
 {
     return Json(_busi.UpdateNavigation(info));
 }