public ProcessMenuMenu_update_insertupdate_rpc(IMenuRepository menuRepository, Func <string, IRepositoryFactory> repositoryAccessor, IQueueService queueService)
 {
     _repository         = menuRepository;
     _queueService       = queueService;
     _repositoryAccessor = repositoryAccessor;
     _repositoryFactory  = _repositoryAccessor("EF");
 }
예제 #2
0
 public MenuSync(IMenuWebHandler handler, IMenuRepository repo, IDevice device, ILogging logging)
 {
     this.handler = handler;
     this.repo    = repo;
     this.device  = device;
     this.logging = logging;
 }
예제 #3
0
 public OrderService(IOrderRepository orderRepository, IMenuRepository menuRepository, IProductRepository productRepository, IMapper mapper)
 {
     _orderRepository   = orderRepository;
     _menuRepository    = menuRepository;
     _productRepository = productRepository;
     _mapper            = mapper;
 }
예제 #4
0
 public MenuService(
     IMenuRepository repository,
     IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
예제 #5
0
        public static int ActionMenuId(ControllerContext context, IMenuRepository menuRepository)
        {
            string controller = context.Controller.ValueProvider.GetValue("controller").RawValue.ToString();
            string action = context.Controller.ValueProvider.GetValue("action").RawValue.ToString();

            return ActionMenuId(menuRepository, controller, action);
        }
예제 #6
0
 public void SetUp()
 {
     _menuRepository     = Substitute.For <IMenuRepository>();
     _menuFromRepository = new Menu();
     _menuRepository.GetMenu().Returns(_menuFromRepository);
     _menuController = new MenuController(_menuRepository);
 }
예제 #7
0
 public MenuService(IMenuRepository menuRepository, IMapper mapper, IProductRepository productRepository, IProductService productService)
 {
     _productRepository = productRepository;
     _menuRepository    = menuRepository;
     _productService    = productService;
     _mapper            = mapper;
 }
 public MenusController(IMenuRepository menuRepository, IDishRepository dishRepository, IUnitOfWork unitOfWork, IMapper mapper)
 {
     _menuRepository = menuRepository;
     _dishRepository = dishRepository;
     _unitOfWork     = unitOfWork;
     _mapper         = mapper;
 }
 public MenuService(IMenuRepository menuRepository, IRoleWiseScreenPermissionService roleWiseScreenPermissionService, IScreenService screenService)
     : base(menuRepository)
 {
     _menuRepository = menuRepository;
     _roleWiseScreenPermissionService = roleWiseScreenPermissionService;
     _screenService = screenService;
 }
예제 #10
0
 private void ResetRepositories()
 {
     _websiteRepository = null;
     _moduleRepository  = null;
     _menuRepository    = null;
     _contentRepository = null;
 }
예제 #11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="repository"></param>
 /// <param name="work"></param>
 public MenuController(ILogger <MenuController> logger,
                       IMenuRepository repository, IUnitWork work)
 {
     this.logger     = logger;
     this.repository = repository;
     this.work       = work;
 }
예제 #12
0
 public DataService(
     IClientRepository client,
     IOrgRepository org,
     ICostRepository cost,
     IDryBoxRepository dryBox,
     IAccountRepository account,
     IRoomRepository room,
     IActiveLogRepository activeLog,
     IServiceLogRepository serviceLog,
     IHolidayRepository holiday,
     IFeedRepository feed,
     IHelpRepository help,
     IGlobalSettingRepository globalSetting,
     IMenuRepository menu,
     INewsRepository news)
 {
     Client        = client;
     Org           = org;
     Cost          = cost;
     DryBox        = dryBox;
     Account       = account;
     Room          = room;
     ActiveLog     = activeLog;
     ServiceLog    = serviceLog;
     Holiday       = holiday;
     Feed          = feed;
     Help          = help;
     GlobalSetting = globalSetting;
     Menu          = menu;
     News          = news;
 }
예제 #13
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="repository"></param>
 /// <param name="_menuRepository"></param>
 /// <param name="_systemTypeRepository"></param>
 /// <param name="logService"></param>
 public RoleAuthorizeService(IRoleAuthorizeRepository repository, IMenuRepository _menuRepository, ISystemTypeRepository _systemTypeRepository, ILogService logService) : base(repository)
 {
     _repository          = repository;
     menuRepository       = _menuRepository;
     systemTypeRepository = _systemTypeRepository;
     _logService          = logService;
 }
예제 #14
0
 public ThongBaoKhiCoHangController(IThongBaoKhiCoHangRepository thongBaoKhiCoHangRepository, IMenuRepository menuRepository, IDetailMenuCommentRepository detailMenuCommentRepository, HttpContextBase httpContext)
 {
     _thongBaoKhiCoHangRepository = thongBaoKhiCoHangRepository;
     _menuRepository = menuRepository;
     _detailMenuCommentRepository = detailMenuCommentRepository;
     _httpContext = httpContext;
 }
 public BannerQuangCaoDanhSachController(IMenuRepository menuRepository, IUnitOfWork unitOfWork, IBannerDanhSachRepository bannerDanhSachRepository, HttpContextBase httpContext)
 {
     _menuRepository           = menuRepository;
     _unitOfWork               = unitOfWork;
     _bannerDanhSachRepository = bannerDanhSachRepository;
     _httpContext              = httpContext;
 }
예제 #16
0
 public MenuService(IMenuRepository menuRepository, IAccessGroupRepository accessGroupRepository, IAccessGroupModelMapper accessGroupMapper, IMenuItemModelMapper menuItemModelMapper)
 {
     _menuRepository        = menuRepository;
     _menuItemModelMapper   = menuItemModelMapper;
     _accessGroupMapper     = accessGroupMapper;
     _accessGroupRepository = accessGroupRepository;
 }
예제 #17
0
 public MenuService(IDbContextScopeFactory dbContextScopeFactory, IMapper mapper
                    , IMenuRepository menuRepository,
                    INavNodeRepository navNodeRepository) : base(dbContextScopeFactory, mapper)
 {
     _menuRepository    = menuRepository;
     _navNodeRepository = navNodeRepository;
 }
예제 #18
0
 public SiteInstallationService(ISiteRepository siteRepository,
                                IValidator <CreateSite> createSiteValidator,
                                ILanguageRepository languageRepository,
                                IValidator <CreateLanguage> createLanguageValidator,
                                ILanguageSortOrderGenerator languageSortOrderGenerator,
                                IPageRepository pageRepository,
                                IValidator <CreatePage> createPageValidator,
                                IValidator <ActivatePage> activatePageValidator,
                                IValidator <AddPageModule> addPageModuleValidator,
                                IModuleRepository moduleRepository,
                                IValidator <CreateModule> createModuleValidator,
                                IMenuRepository menuRepository,
                                IValidator <CreateMenu> createMenuValidator,
                                IValidator <AddMenuItem> addMenuItemValidator,
                                IModuleTypeRepository moduleTypeRepository)
 {
     _siteRepository             = siteRepository;
     _createSiteValidator        = createSiteValidator;
     _languageRepository         = languageRepository;
     _createLanguageValidator    = createLanguageValidator;
     _languageSortOrderGenerator = languageSortOrderGenerator;
     _pageRepository             = pageRepository;
     _createPageValidator        = createPageValidator;
     _activatePageValidator      = activatePageValidator;
     _addPageModuleValidator     = addPageModuleValidator;
     _moduleRepository           = moduleRepository;
     _createModuleValidator      = createModuleValidator;
     _menuRepository             = menuRepository;
     _createMenuValidator        = createMenuValidator;
     _addMenuItemValidator       = addMenuItemValidator;
     _moduleTypeRepository       = moduleTypeRepository;
 }
예제 #19
0
 public MainMenuController(IMenuRepository repository, IUnitOfWork unitOfWork, IMenuManager manager)
 {
     _repository = repository;
     _unitOfWork = unitOfWork;
     _repository.UnitOfWork = unitOfWork;
     _manager = manager;
 }
예제 #20
0
 public MenuService(IMenuRepository menuRepository, IAtividadeRepository atividadeRepository, IMensagemRepository mensagemRepository, IUsuarioRepository usuarioRepository)
 {
     _menuRepository = menuRepository;
     _atividadeRepository = atividadeRepository;
     _mensagemRepository = mensagemRepository;
     _usuarioRepository = usuarioRepository;
 }
예제 #21
0
 public HomeController(IManagerRepository manager, IManagerRoleRepository managerRole, IMenuRepository menu, IRolePermissionRepository rolePermission)
 {
     _manager        = manager;
     _managerRole    = managerRole;
     _menu           = menu;
     _rolePermission = rolePermission;
 }
예제 #22
0
 public CmsController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IAuthorizationService authorizationService,
     ILoggerFactory loggerFactory,
     ISiteRepository siteRepository,
     ISitePageRepository sitePageRepository,
     ISectionRepository sectionRepository,
     IArticleRepository articleRepository,
     IBrandingRepository brandingRepository,
     ICarouselRepository carouselRepository,
     ICarouselSlideRepository carouselSlideRepository,
     IMenuRepository menuRepository,
     IMenuItemRepository menuItemRepository,
     Site site
     )
 {
     _userManager          = userManager;
     _signInManager        = signInManager;
     _authorizationService = authorizationService;
     _logger                      = loggerFactory.CreateLogger <CmsController>();
     this.siteRepository          = siteRepository;
     this.sitePageRepository      = sitePageRepository;
     this.sectionRepository       = sectionRepository;
     this.articleRepository       = articleRepository;
     this.brandingRepository      = brandingRepository;
     this.carouselRepository      = carouselRepository;
     this.carouselSlideRepository = carouselSlideRepository;
     this.menuRepository          = menuRepository;
     this.menuItemRepository      = menuItemRepository;
     this.site                    = site;
 }
예제 #23
0
 public MenuService(
     IMenuRepository menuRepository,
     IUnitOfWork unitOfWork)
 {
     this.menuRepository = menuRepository;
     this.unitOfWork     = unitOfWork;
 }
 public HomeController(IAccMember298Repository accMember298Repository, IMenuRepository menuRepository, IUserRatingRepository userRatingRepository, IUnitOfWork unitOfWork)
 {
     _accMember298Repository = accMember298Repository;
     _menuRepository         = menuRepository;
     _userRatingRepository   = userRatingRepository;
     _unitOfWork             = unitOfWork;
 }
 public MenuFunctionServices(IMenuFunctionRepository menuFunctionRepository, IRepository <Function, Guid> functionRepository, IMenuRepository menuRepository, IUnitOfWork unitOfWork)
 {
     _menuFunctionRepository = menuFunctionRepository;
     _functionRepository     = functionRepository;
     _menuRepository         = menuRepository;
     _unitOfWork             = unitOfWork;
 }
예제 #26
0
 public MenuService(IMenuRepository menuRepository, IAccessGroupRepository accessGroupRepository, IAccessGroupModelMapper accessGroupMapper, IMenuItemModelMapper menuItemModelMapper)
 {
     _menuRepository = menuRepository;
     _menuItemModelMapper = menuItemModelMapper;
     _accessGroupMapper = accessGroupMapper;
     _accessGroupRepository = accessGroupRepository;
 }
예제 #27
0
 public MenuAppService(IMenuRepository menuRepository, IUserRepository userRepository, IRoleRepository roleRepository, IMapper mapper)
 {
     _menuRepository = menuRepository;
     _userRepository = userRepository;
     _roleRepository = roleRepository;
     _mapper         = mapper;
 }
예제 #28
0
        public string GetMenuTitle(string menuID)
        {
            IMenuRepository menuRepository = RepositoryClassFactory.GetInstance().GetMenuRepository();
            Menu            menu           = menuRepository.FindByID(menuID);

            return(menu != null ? menu.Title : menuID);
        }
 public CartController(IMenuRepository menuRepository, IPromotionRepository promotionRepository, IProductStockSyncRepository productStockSyncRepository, IMenuOptionRepository menuOptionRepository, IDetailMenuRepository detailMenuRepository)
 {
     _menuRepository             = menuRepository;
     _promotionRepository        = promotionRepository;
     _productStockSyncRepository = productStockSyncRepository;
     _menuOptionRepository       = menuOptionRepository;
     _detailMenuRepository       = detailMenuRepository;
 }
예제 #30
0
 public MenuService(IMenuRepository menuRepository, IPeAdminRepository peAdminRepository,
                    IPeRoleRepository peRoleRepository, IMenuRoleRepository menuRoleRepository)
 {
     _menuRepository     = menuRepository;
     _peAdminRepository  = peAdminRepository;
     _peRoleRepository   = peRoleRepository;
     _menuRoleRepository = menuRoleRepository;
 }
예제 #31
0
 public DashboardController(IDashboardRepository dashboardRepository, IMenuItemRepository menuItemRepository, IMenuRepository menuRepository, IItemTagRepository itemTagRepository, ICategoryRepository categoryRepository, IServiceProvider serviceProvider) : base(serviceProvider)
 {
     _dashboardRepository = dashboardRepository;
     _categoryRepository  = categoryRepository;
     _itemTagRepository   = itemTagRepository;
     _menuRepository      = menuRepository;
     _menuItemRepository  = menuItemRepository;
 }
예제 #32
0
        public MenuPodeRemoverValid(IMenuRepository menuRepository)
        {
            _menuRepository = menuRepository;

            var Menu_SendoUsado = new MenuSendoUsadoSpec(menuRepository);

            RuleFor(x => x).Must(MenuSendoUsadoSpec).WithMessage("Menu sendo usado!");
        }
예제 #33
0
 public BusinessDependencies(ISiteContextService siteContextService, ICompanyRepository companyRepository, ISocialLinkRepository socialLinkRepository, ICultureService cultureService, IMenuRepository menuRepository)
 {
     SiteContextService   = siteContextService;
     CompanyRepository    = companyRepository;
     SocialLinkRepository = socialLinkRepository;
     CultureService       = cultureService;
     MenuRepository       = menuRepository;
 }
예제 #34
0
 public RoleService(IControlRoomUnitOfWork unitOfWork)
 {
     this.unitOfWork             = unitOfWork;
     roleRepository              = unitOfWork.RoleRepository;
     operationCategoryRepository = unitOfWork.OperationCategoryRepository;
     operationRepository         = unitOfWork.OperationRepository;
     menuRepository              = unitOfWork.MenuRepository;
 }
예제 #35
0
 public ControllerBase(ICommandBus commandBus, 
                       IMenuRepository menuRepository,
                       IPartRepository partRepository)
 {
     CommandBus = commandBus;
     MenuRepository = menuRepository;
     PartRepository = partRepository;
 }
예제 #36
0
        public ConfigMenuController(IMenuRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.To<long>();
            this._UserId = view.UserId.To<int>();
            this._OfficeId = view.OfficeId.To<int>();
            this._Catalog = catalog;

            this.MenuRepository = repository;
        }
예제 #37
0
 public MenuPermissionService(IActionRepository actionRepository, IMenuRepository menuRepository,
     IActionRoleRepository actionRoleRepository, IMenuRoleRepository menuRoleRepository, IMenuDomainService menuDomainService)
 {
     _actionRepository = actionRepository;
     _menuRepository = menuRepository;
     _actionRoleRepository = actionRoleRepository;
     _menuRoleRepository = menuRoleRepository;
     _menuDomainService = menuDomainService;
 }
예제 #38
0
        public MenuController(IMenuRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.MenuRepository = repository;
        }
예제 #39
0
 public SharedController(IMenuRepository menuRepository, 
                         IOuterLinkRepository outerLinkRepository,
                         ISliderRepository sliderRepository,
                         IArticleRepository articleRepository)
 {
     this.menuRepository = menuRepository;
     this.outerLinkRepository = outerLinkRepository;
     this.sliderRepository = sliderRepository;
     this.articleRepository = articleRepository;
 }
예제 #40
0
        private void InsertOrUpdateMenu(IMenuRepository menuRepository, int index, Menu menu, MenuLevel level, Guid? parentId)
        {
            // sort start with 1

            // a1, check the paramters
            //  1, check the level and parentId
            //      1a, when level = parent, the parentId = null
            //      2a, when level != parent and the parentId = null, throw exception.
            // a2, check the index
            //  1, index > 0

            // a1, when level = parent
            //  1, find all menus that level = parent
            //      1a, if the index > menus count, set the sort = (countOfMenu + 1)
            //      1b, if the index <= menus count, set the sort = (countOfMenu + 1), then set the sort that large then index add one
            // a2, when level = child
            //  1, find all menus that parentId = input parentId
            //      1a, when the index > menus count, set the sort = (countOfMenu + 1)
            //      1b, when the index <= menus count, set the sort = (countOfMenu + 1), then set the sort that large then index add one

            ISpecification<Menu> spec = null;
            var existMenu = menuRepository.Exist(Specification<Menu>.Eval(m => m.ID == menu.ID));

            if (level == MenuLevel.Parent)
            {
                spec = Specification<Menu>.Eval(m => m.Level == MenuLevel.Parent);
            }

            if (level == MenuLevel.Children)
            {
                if (!parentId.HasValue)
                    throw new ArgumentNullException("parentId", "When menuLevel is children, the parentId must be not null.");

                spec = Specification<Menu>.Eval(m => m.Level == MenuLevel.Children && m.ParentId == parentId);
            }

            var menus = this.GetMenus(menuRepository, spec, menu.ID, existMenu);
            
            // if the menu not exist, add the menu (the menu has been atteched).
            if (!existMenu)
            {
                var sort = this.InsertSortMenu(menus, index);
                menu.SetSort(sort);
                menuRepository.Add(menu);
            }
            else
            {
                var sort = this.MoveSortMenu(menus, menu.Sort, index);
                menu.SetSort(sort);
                menuRepository.Update(menu);
                foreach (var item in menus)
                    menuRepository.Update(item);
            }
        }
예제 #41
0
파일: MenuService.cs 프로젝트: causer/Itasu
 public MenuService(
     IMenuRepository menuRepository, 
     IMenuItemRepository menuItemRepository,
     IMapper mapper,
     ICommandDispacher commandBus)
 {
     _menuRepository = menuRepository;
     _menuItemRepository = menuItemRepository;
     _mapper = mapper;
     _commandBus = commandBus;
 }
예제 #42
0
 public AboutController(ICommandBus commandBus,
                        IMenuRepository menuRepository,
                        IPartRepository partRepository,
                        IStaffRepository staffRepository,
                        IOfficePhotoRepository officePhotoRepository,
                        INewsRepository newsRepository)
     : base(commandBus, menuRepository, partRepository)
 {
     this.staffRepository = staffRepository;
     this.officePhotoRepository = officePhotoRepository;
     this.newsRepository = newsRepository;
 }
예제 #43
0
        public static int ActionMenuId(IMenuRepository menuRepository, string controller, string action)
        {
            Menu[] menus = menuRepository
                .GetMany(m => m.UrlController == controller && m.UrlAction == action)
                .ToArray();

            if (!menus.Any()) return -1;

            if (menus.Count() == 1)
                return menus.First().MenuId;

            return menus.First(m => m.Parent != null).MenuId;
        }
예제 #44
0
        public ConfigMenuController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.To<long>();
            this._UserId = AppUsers.GetCurrent().View.UserId.To<int>();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.To<int>();
            this._Catalog = AppUsers.GetCatalog();

            this.MenuRepository = new Frapid.Config.DataAccess.Menu
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
예제 #45
0
        /// <summary>
        /// Constructor
        /// </summary>
        public MenuRightsService(IMenuRightRepository menuRightRepository, IMenuRepository menuRepository)
        {
            if (menuRightRepository == null)
            {
                throw new ArgumentNullException("menuRightRepository");
            }
            if (menuRepository == null)
            {
                throw new ArgumentNullException("menuRepository");
            }

            this.menuRightRepository = menuRightRepository;
            this.menuRepository = menuRepository;
        }
예제 #46
0
        public MenuController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.MenuRepository = new MixERP.Net.Schemas.Core.Data.Menu
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
예제 #47
0
        protected override void Initialize(HttpControllerContext context)
        {
            base.Initialize(context);

            if (this.MenuRepository == null)
            {
                this.MenuRepository = new Frapid.Core.DataAccess.Menu
                {
                    _Catalog = this.MetaUser.Catalog,
                    _LoginId = this.MetaUser.LoginId,
                    _UserId = this.MetaUser.UserId
                };
            }
        }
 public MenuController(IMenuRepository menuRepository)
 {
     this._menuRepository = menuRepository;
 }
예제 #49
0
 public HomeController(IMenuRepository menuRepository)
 {
     this.menuRepository = menuRepository;
 }
예제 #50
0
 public void AddOrUpdateMenu(IMenuRepository menuRepository, Menu menu)
 {
     this.InsertOrUpdateMenu(menuRepository, menu.Sort, menu, menu.Level, menu.ParentId);
 }
예제 #51
0
 public MenuItemManagementService(IMenuRepository menuRepository)
 {
     _menuRepository = menuRepository;
 }
예제 #52
0
 public DynamicLinksController(IMenuRepository rep,IOrderRepository orep)
 {
     _rep = rep;
     _orep = orep;
 }
예제 #53
0
 public MenuDisplayingService(IMenuRepository menuRepository)
 {
     _menuRepository = menuRepository;
 }
예제 #54
0
 public MenuService(IMenuRepository menuRepository)
 {
     this.menuRepository = menuRepository;
 }
예제 #55
0
 private List<Menu> GetMenus(IMenuRepository menuRepository, ISpecification<Menu> spec, Guid menuId, bool isExistMenu)
 {
     var specification = spec;
     if (isExistMenu)
         specification = spec.AndNotSpecification(Specification<Menu>.Eval(m => m.ID == menuId));
     return menuRepository.FindAll(specification).ToList();
 }
예제 #56
0
 public PageBindingController(IMenuRepository menuRepo)
 {
     menuRepository = menuRepo;
     base.SetPageHeader("Page Binding");
 }
예제 #57
0
 public MenuService(IMenuRepository menuRepository)
 {
     _menuRepository = menuRepository;
 }
예제 #58
0
 public MenuService(IMenuRepository menuRepository, IUnitOfWork unitOfWork)
 {
     this._menuRepository = menuRepository;
     this._UnitOfWork = unitOfWork;
 }
 public MenuManageController(IMenuRepository menuRepository)
 {
     MenuRepository = menuRepository;
 }
예제 #60
0
 public MenuServiceImpl(IRepositoryContext context, IMenuRepository menuRepository)
     : base(context)
 {
     this.menuRepository = menuRepository;
 }