Beispiel #1
0
 public LabelsController(
     ILabelService <LabelBase> labelService,
     IContextFacade contextFacade)
 {
     _labelService  = labelService;
     _contextFacade = contextFacade;
 }
 public LookupController(ILabelService labelService, ILoggerFactory logger, ICacheManager cacheManager,
                         UserManager <ApplicationUser> userManager, ILookupService lookupService, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     this.Logger        = logger.CreateLogger("RoadieApi.Controllers.LookupController");
     this.LookupService = lookupService;
 }
Beispiel #3
0
        public static PrintLabelResult GenerateLabel(
            IUnitOfWork db,
            ILabelService labelService,
            IWeightService weightService,
            IShippingService shippingService,
            MailViewModel model,
            DateTime when,
            long?by)
        {
            var shippingMethod = db.ShippingMethods.GetByIdAsDto(model.ShippingMethodSelected.Value);

            var orderItems = model.Items.Select(i => i.GetItemDto()).ToList() ?? new List <DTOOrderItem>();

            //Fill with additional data
            MailViewModel.FillItemsWithAdditionalInfo(db, weightService, model.OrderID, orderItems);

            var mailInfo = new MailLabelDTO
            {
                FromAddress = model.FromAddress.GetAddressDto(),
                ToAddress   = model.ToAddress.GetAddressDto(),

                Notes        = model.Notes,
                Instructions = model.Instructions,
                OrderId      = model.OrderID,
                WeightLb     = model.WeightLb,
                WeightOz     = model.WeightOz,

                PackageHeight = model.PackageHeight,
                PackageLength = model.PackageLength,
                PackageWidth  = model.PackageWidth,

                IsAddressSwitched         = model.IsAddressSwitched,
                IsUpdateRequired          = model.UpdateAmazon,
                IsCancelCurrentOrderLabel = model.CancelCurrentOrderLabel,

                IsInsured          = model.IsInsured,
                IsSignConfirmation = model.IsSignConfirmation,
                TotalPrice         = model.TotalPrice,
                TotalPriceCurrency = model.TotalPriceCurrency,

                ShippingMethod       = shippingMethod,
                ShipmentProviderType = shippingMethod.ShipmentProviderType,

                Items = orderItems,

                MarketplaceCode = model.MarketplaceCode,
                Reason          = model.ReasonCode ?? 0,

                BoughtInTheCountry = MarketBaseHelper.GetMarketCountry((MarketType)model.Market, model.MarketplaceId),
            };

            return(labelService.PrintMailLabel(db,
                                               shippingService,
                                               mailInfo,
                                               when,
                                               by,
                                               AppSettings.LabelDirectory,
                                               AppSettings.TemplateDirectory,
                                               AppSettings.IsSampleLabels));
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ISubdomainService" /> class
 /// </summary>
 /// <param name="unitOfWork"><see cref="IUnitOfWork"/></param>
 public SubdomainService(
     IUnitOfWork unitOfWork,
     ILabelService labelService)
     : base(unitOfWork)
 {
     this.labelService = labelService;
 }
Beispiel #5
0
        private void Init()
        {
            var context = new OmsContext();

            _orderRepository            = new OrderRepository(context);
            _customerLocationRepository = new CustomerLocationRepository(context);
            var customerRepository = new CustomerRepository(context);

            _customerProductDataRepository = new CustomerProductDataRepository(context);
            _orderService                    = new OrderService(_orderRepository, customerRepository, _customerLocationRepository, _coldWeightRepository);
            _orderDetailService              = new OrderDetailService(_orderDetailRepository, _orderRepository, _productRepository, _customerLocationRepository, new SpeciesRepository(context), _customerProductDataRepository);
            _labelService                    = new LabelService();
            _labelCreateService              = new LabelCreateService();
            _productRepository               = new ProductRepository(context);
            _coldWeightRepository            = new ColdWeightEntryRepository(context);
            _offalRepository                 = new OffalRepository(context);
            _orderComboRepository            = new OrderComboRepository(context);
            _orderOffalRepository            = new OrderOffalRepository(context);
            _orderDetailRepository           = new OrderDetailRepository(context);
            _animalOrderDetailRepository     = new AnimalOrderDetailRepository(context);
            _coldWeightEntryRepository       = new ColdWeightEntryRepository(context);
            _qualityGradeRepository          = new QualityGradeRepository(context);
            _animalLabelRepository           = new AnimalLabelRepository(context);
            _coldWeightEntryDetailRepository = new ColdWeightEntryDetailRepository(context);
        }
 public LabelAppService(ILabelService service, IExpenseAppService expenseAppService, ILabelAdapter adapter, IUnitOfWork unitOfWork)
     : base(service, adapter, unitOfWork)
 {
     _service           = service;
     _adapter           = adapter;
     _expenseAppService = expenseAppService;
 }
Beispiel #7
0
 public LookupController(ILabelService labelService, ILogger <LookupController> logger, ICacheManager cacheManager,
                         UserManager <User> userManager, ILookupService lookupService, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     Logger        = logger;
     LookupService = lookupService;
 }
Beispiel #8
0
        protected void BtnAddLink_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                IUnityContainer container    = (IUnityContainer)HttpContext.Current.Application["unityContainer"];
                ILinkService    linkService  = container.Resolve <ILinkService>();
                ILabelService   labelService = container.Resolve <ILabelService>();

                UserSession userSession = (UserSession)this.Context.Session["userSession"];
                long        userId      = userSession.UserProfileId;

                long linkId;
                try
                {
                    linkId = linkService.AddLink(userId, MovieId, txtName.Text, txtDescription.Text, txtUrl.Text);
                }
                catch (DuplicateInstanceException <LinkDetails> ex)
                {
                    if (ex.Properties[1].Name == "url")
                    {
                        atvUrl.Visible = true;
                    }
                    else if (ex.Properties[1].Name == "name")
                    {
                        atvName.Visible = true;
                    }
                    return;
                }
                labelService.SetLabelsForLink(userId, linkId, new List <string>(txtLabels.Text.Split(' ')));

                Response.Redirect(Response.ApplyAppPathModifier("~/Pages/Link/Link.aspx?linkId=" + linkId));
            }
        }
Beispiel #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LabelsController" /> class
 /// </summary>
 /// <param name="mapper"><see cref="IMapper"/></param>
 /// <param name="labelService"><see cref="ILabelService"/></param>
 public LabelsController(
     IMapper mapper,
     ILabelService labelService)
 {
     this.mapper       = mapper;
     this.labelService = labelService;
 }
Beispiel #10
0
        public void Remove(object sender, EventArgs e)
        {
            IUnityContainer container    = (IUnityContainer)HttpContext.Current.Application["unityContainer"];
            ILinkService    linkService  = container.Resolve <ILinkService>();
            ILabelService   labelService = container.Resolve <ILabelService>();

            UserSession userSession = (UserSession)this.Context.Session["userSession"];
            long        userId      = userSession.UserProfileId;

            try
            {
                labelService.RemoveLabelsForLink(userId, LinkId);
                linkService.RemoveLink(userId, LinkId);
            }
            catch (UserNotAuthorizedException <LinkDetails> )
            {
                pError.Visible = true;
            }

            if (CookiesManager.GetPreferredSearchEngine(Context) == "webshop")
            {
                Response.Redirect(Response.ApplyAppPathModifier("~/Pages/Movie/Movie.aspx?movieId=" + MovieId));
            }
            else
            {
                Response.Redirect(Response.ApplyAppPathModifier("~/Pages/Movie/MovieXml.aspx?movieId=" + MovieId));
            }
        }
Beispiel #11
0
 public DrawingController(IDrawingService drawingService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, ITemplateService templateService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _structureService = structureService;
     _templateService  = templateService;
     _authUtils        = new AuthUtils(drawingService, labelService, rFixtureService, structureService, viewService);
 }
Beispiel #12
0
        private void UpdateCloud()
        {
            IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"];

            ILabelService labelService = container.Resolve <ILabelService>();

            DictionaryBlock <string, long> labelMap = labelService.GetMostValuedLabels(0, Settings.Default.WebMovies_labelsPerCloud);

            if (labelMap.Count == 0)
            {
                UpdateCloudFake();
                return;
            }
            double max = labelMap.Values.Max();
            double min = labelMap.Values.Min();

            SortedSet <ListItem> labels = new SortedSet <ListItem>(new AlphabeticalListItemTextComparer());

            foreach (string label in labelMap.Keys)
            {
                double rating  = labelMap[label];
                int    minSize = 30;
                if (max > min)
                {
                    minSize = (int)((rating - min) / (max - min) * 20.0 + 20.0);
                }
                ListItem listItem = new ListItem(label, minSize.ToString());
                labels.Add(listItem);
            }

            CloudView.DataSource = labels;
            CloudView.DataBind();
        }
Beispiel #13
0
        private void ClearListViewItems()
        {
            if (listView1.Items.Count != 0)
            {
                for (int i = listView1.Items.Count - 1; i >= 0; i--)
                {
                    if (RemoveFeature != null)
                    {
                        RemoveFeature(listView1.Items[i].Tag as Feature);
                    }
                }
                listView1.Items.Clear();
            }
            ILabelLayer lyr = FindLabelLayer(_layerName);

            if (lyr != null)
            {
                lyr.Dispose();
            }
            ICanvasViewer viewer = _session.SmartWindowManager.ActiveCanvasViewer;

            if (viewer != null)
            {
                ILabelService srv = (viewer as ICurrentRasterInteractiver).LabelService;
                srv.Reset();
            }
            _iceLineFeatureOid = 0;
        }
Beispiel #14
0
        private void UpdateLabels()
        {
            IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"];

            ILabelService labelService = container.Resolve <ILabelService>();

            DictionaryBlock <string, long> labelMap = labelService.GetLabelsForLink(LinkId, 0, int.MaxValue - 1);

            if (labelMap.Count > 0)
            {
                double max = labelMap.Values.Max();
                double min = labelMap.Values.Min();

                SortedSet <ListItem> labels = new SortedSet <ListItem>(new AlphabeticalListItemTextComparer());
                foreach (string label in labelMap.Keys)
                {
                    double rating  = labelMap[label];
                    int    minSize = 15;
                    if (max > min)
                    {
                        minSize = (int)((rating - min) / (max - min) * 10.0 + 10.0);
                    }
                    ListItem listItem = new ListItem(label, minSize.ToString());
                    labels.Add(listItem);
                }

                lvLabels.DataSource = labels;
                lvLabels.DataBind();
            }
        }
Beispiel #15
0
 public Mutation(ITodoItemService todoItemService, ITodoListService todoListService, ILabelService labelService, IMapper mapper)
 {
     _todoItemService = todoItemService;
     _todoListService = todoListService;
     _labelService    = labelService;
     _mapper          = mapper;
 }
Beispiel #16
0
        public TranscriptionService(ITransactionService transactionService,
                                    IMapper mapper,
                                    IUsersRepository usersRepository,
                                    IImportRepository importsRepository,
                                    IWorkingPeriodsService workingPeriodsService,
                                    ITranscriptionRepository transcriptionRepository,
                                    ILabelingModuleConfiguration labelingModuleConfiguration,
                                    IAudioReopenSubscriptionService audioReopenSubscriptionService,
                                    IDeepSpeechControlProxy deepSpeechControlProxy,
                                    IAssignedLabelGroupsRepository assignedLabelGroupsRepository,
                                    ILabelingAudioService labelingAudioService,
                                    ILabelService labelService,
                                    ITranscriptionLabelsRepository transcriptionLabelsRepository,
                                    ITranscriptionMetricsRepository transcriptionMetricsRepository,
                                    ITranscriptionSelectedLabelRepository transcriptionSelectedLabelRepository)
        {
            this.mapper                               = mapper;
            this.transactionService                   = transactionService;
            this.usersRepository                      = usersRepository;
            this.workingPeriodsService                = workingPeriodsService;
            this.importsRepository                    = importsRepository;
            this.deepSpeechControlProxy               = deepSpeechControlProxy;
            this.labelingModuleConfiguration          = labelingModuleConfiguration;
            this.audioReopenSubscriptionService       = audioReopenSubscriptionService;
            this.transcriptionRepository              = transcriptionRepository;
            this.assignedLabelGroupsRepository        = assignedLabelGroupsRepository;
            this.labelingAudioService                 = labelingAudioService;
            this.labelService                         = labelService;
            this.transcriptionLabelsRepository        = transcriptionLabelsRepository;
            this.transcriptionMetricsRepository       = transcriptionMetricsRepository;
            this.transcriptionSelectedLabelRepository = transcriptionSelectedLabelRepository;

            randomizer = new Random();
        }
Beispiel #17
0
 public AuthUtils(IDrawingService drawingService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _labelService     = labelService;
     _rFixtureService  = rFixtureService;
     _structureService = structureService;
     _viewService      = viewService;
 }
Beispiel #18
0
        public CurrentRasterInteractiver(ICanvasViewer canvasViewer)
        {
            _canvasViewer = canvasViewer;
            _labelService = new LabelService(_canvasViewer);
            Control control = _canvasViewer.Canvas.Container;

            control.MouseUp += new MouseEventHandler(control_MouseUp);
        }
Beispiel #19
0
 public LabelReprintFacadeService(
     IRepository <LabelReprint, int> repository,
     ITransactionManager transactionManager,
     ILabelService labelService)
     : base(repository, transactionManager)
 {
     this.labelService = labelService;
 }
Beispiel #20
0
 public LabelController(IProjectService projectService,
                        ILabelService labelService,
                        IOrganizationService organizationService,
                        IJournalService journalService) : base(organizationService, journalService)
 {
     _projectService = projectService;
     _labelService   = labelService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ISubdomainService" /> class
 /// </summary>
 /// <param name="unitOfWork"><see cref="IUnitOfWork"/></param>
 /// <param name="labelService"><see cref="ILabelService"/></param>
 /// <param name="notificationService"><see cref="INotificationService"/></param>
 public SubdomainService(
     IUnitOfWork unitOfWork,
     ILabelService labelService,
     INotificationService notificationService)
     : base(unitOfWork)
 {
     this.labelService        = labelService;
     this.notificationService = notificationService;
 }
		public DefaultTerrificTemplateHandler(IViewEngine viewEngine, IModelProvider modelProvider,
			ITemplateRepository templateRepository, ILabelService labelService, IModuleRepository moduleRepository)
		{
			_viewEngine = viewEngine;
			_modelProvider = modelProvider;
			_templateRepository = templateRepository;
			_labelService = labelService;
			_moduleRepository = moduleRepository;
		}
 public ExpenseController(
     IExpenseService expenseService,
     ILabelService labelService,
     IValidateHelper validateHelper)
 {
     _expenseService = expenseService;
     _labelService   = labelService;
     _validateHelper = validateHelper;
 }
Beispiel #24
0
 public DefaultTerrificTemplateHandler(IViewEngine viewEngine, IModelProvider modelProvider,
                                       ITemplateRepository templateRepository, ILabelService labelService, IModuleRepository moduleRepository)
 {
     _viewEngine         = viewEngine;
     _modelProvider      = modelProvider;
     _templateRepository = templateRepository;
     _labelService       = labelService;
     _moduleRepository   = moduleRepository;
 }
Beispiel #25
0
 public SideBarController(IBookService bookService, IUserService userService, ICommentService commentService,
                          ILabelService labelService, ICategoryService categoryService)
 {
     _bookService     = bookService;
     _userService     = userService;
     _commentService  = commentService;
     _labelService    = labelService;
     _categoryService = categoryService;
 }
Beispiel #26
0
 public SideBarController(IBookService bookService, IUserService userService, ICommentService commentService,
     ILabelService labelService, ICategoryService categoryService)
 {
     _bookService = bookService;
     _userService = userService;
     _commentService = commentService;
     _labelService = labelService;
     _categoryService = categoryService;
 }
Beispiel #27
0
 public PostController(IUnitOfWork uow, IPostService postService, ILabelService labelService,
     IUserService userService, IDownloadLinkService downloadLinkService)
 {
     _uow = uow;
     _postService = postService;
     _labelService = labelService;
     _userService = userService;
     _downloadLinkService = downloadLinkService;
 }
Beispiel #28
0
 public PostController(IUnitOfWork uow, IPostService postService, ILabelService labelService,
                       IUserService userService)//, IDownloadLinkService downloadLinkService
 {
     _uow          = uow;
     _postService  = postService;
     _labelService = labelService;
     _userService  = userService;
     //_downloadLinkService = downloadLinkService;
 }
Beispiel #29
0
        public ExpensesController(
            IExpenseAppService service,
            ILabelService labelService,
            IPaymentService paymentService)
        {
            _service = service;

            _labelService   = labelService;
            _paymentService = paymentService;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AssessmentQuery"/> class.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="labelService">The label service.</param>
 /// <param name="todoListService">The todo list service.</param>
 public AssessmentQuery(IToDoItemService service, ILabelService labelService, IToDoListService todoListService, IUserService userService)
 {
     _todoitemService = service;
     _labelService    = labelService;
     _todolistService = todoListService;
     _userService     = userService;
     pagingDto        = new Contract.Core.Contract.PagingDTO {
         PageIndex = 0, PageSize = 0, SearchString = null
     };
 }
Beispiel #31
0
        private ILabelLayer GetLabelLayer(ICurrentRasterInteractiver viewer, string name, string[] fieldNames)
        {
            ILabelService srv = viewer.LabelService;

            if (srv == null)
            {
                return(null);
            }
            return(srv.GetLabelLayer(name, fieldNames));
        }
Beispiel #32
0
 public DrawingHub(IDrawingService drawingService, IFixtureService fixtureService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, IUserService userService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _fixtureService   = fixtureService;
     _labelService     = labelService;
     _rFixtureService  = rFixtureService;
     _structureService = structureService;
     _userService      = userService;
     _viewService      = viewService;
     _authUtils        = new AuthUtils(drawingService, labelService, rFixtureService, structureService, viewService);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SubdomainsController" /> class
 /// </summary>
 /// <param name="mapper"><see cref="IMapper"/></param>
 /// <param name="subdomainService"><see cref="ISubdomainService"/></param>
 /// <param name="targetService"><see cref="ITargetService"/></param>
 /// <param name="labelService"><see cref="ILabelService"/></param>
 public SubdomainsController(
     IMapper mapper,
     ISubdomainService subdomainService,
     ITargetService targetService,
     ILabelService labelService)
 {
     this.mapper           = mapper;
     this.subdomainService = subdomainService;
     this.targetService    = targetService;
     this.labelService     = labelService;
 }
Beispiel #34
0
 public LabelController(IUnitOfWork uow, ILabelService labelService)
 {
     _uow = uow;
     _labelService = labelService;
 }
        public PageEditDefaultTerrificTemplateHandler(IViewEngine viewEngine, IModelProvider modelProvider, ITemplateRepository templateRepository, ILabelService labelService, IModuleRepository moduleRepository) 
			: base(viewEngine, modelProvider, templateRepository, labelService, moduleRepository)
        {
        }