コード例 #1
0
 public MenuAdminIndexVm()
 {
     RouteParameter        = new RouteParameterVm <TKey>();
     RouteName             = new RouteNameVm <TKey>();
     MenuItemRelationGroup = new MenuItemRelationGroupVm <TKey>();
     MenuItem = new MenuItemVm <TKey, TParentId>();
     CurrentRouteMenuItems  = new List <RouteMenuItemVm <TKey, TParentId> >();
     CurrentRouteName       = new List <RouteNameVm <TKey> >();
     CurrentRouteParameters = new List <RouteParameterVm <TKey> >();
 }
コード例 #2
0
 public ActionResult SaveRouteParamName(RouteParameterVm <int> vm)
 {
     try
     {
         _routeParamRepository.SaveById(new RouteParam
         {
             Id          = vm.Id,
             Code        = vm.Code,
             IsActive    = vm.IsActive,
             Name        = vm.Name,
             SortOrder   = vm.SortOrder,
             DateCreated = DateTime.Now,
         });
         return(Json(new { success = 1 }));
     }
     catch (Exception ex)
     {
         LogEventManager.Logger.Error(ex.Message, ex);
         return(Json(new { success = false }));
     }
     finally
     {
     }
 }