Пример #1
0
 public Commandhandler(NiisWebContext niisContext, IRequisitionSendService requisitionSendService,
                       AppConfiguration configuration)
 {
     _niisContext            = niisContext;
     _requisitionSendService = requisitionSendService;
     _configuration          = configuration;
 }
Пример #2
0
 /// <summary>
 ///     ОБработка МКИЭТЗ
 /// </summary>
 /// <param name="localContext"></param>
 /// <param name="markgr"></param>
 /// <param name="request"></param>
 /// <param name="statusCode"></param>
 /// <param name="protectionDocIcfems"></param>
 private void ProcessIcfem(NiisWebContext localContext, MARKGR markgr, Request request, string statusCode,
                           IList <DicIcfemProtectionDocRelation> protectionDocIcfems)
 {
     foreach (var v in markgr.CURRENT.VIENNAGR.VIECLA3)
     {
         var icefIcfem =
             localContext.DicICFEMs.FirstOrDefault(cf => cf.Code.Replace(".", "").Trim() == v.Trim());
         if (icefIcfem != null)
         {
             if (localContext.DicIcfemRequestRelations.All(icf =>
                                                           icf.DicIcfemId != icefIcfem.Id && icf.RequestId != request.Id))
             {
                 LogMsg(null, icefIcfem.NameRu, "МКИЭТЗ");
                 request.Icfems.Add(new DicIcfemRequestRelation
                 {
                     DicIcfemId = icefIcfem.Id,
                     DicIcfem   = icefIcfem
                 });
                 if (statusCode == "D.TZ")
                 {
                     protectionDocIcfems.Add(new DicIcfemProtectionDocRelation
                     {
                         DicIcfemId = icefIcfem.Id,
                         DicIcfem   = icefIcfem
                     });
                 }
             }
         }
     }
 }
Пример #3
0
 public CustomerUpdater(NiisWebContext context, IGbdJuridicalService gbdJuridicalService,
                        IGbdFlService gbdFlService)
 {
     _context             = context;
     _gbdJuridicalService = gbdJuridicalService;
     _gbdFlService        = gbdFlService;
 }
Пример #4
0
 public CommandHandler(
     NiisWebContext context,
     INumberGenerator generator)
 {
     _context   = context;
     _generator = generator;
 }
Пример #5
0
        //public string name { get; set; }

        #endregion Свойства

        #region Конструктор
        public NiisRepository(NiisWebContext context, IServiceProvider services)
        {
            _context = context;
            //_services = services;
            _serviceScope = services.CreateScope();
            //name = Guid.NewGuid().ToString();
        }
Пример #6
0
 public JournalController(IExecutor executor, IFileStorage fileStorage, NiisWebContext context, IFileConverter fileConverter)
 {
     _executor      = executor;
     _fileStorage   = fileStorage;
     _context       = context;
     _fileConverter = fileConverter;
 }
Пример #7
0
 public CommandHandler(IWorkflowApplier <Domain.Entities.Contract.Contract> workflowApplier, IMapper mapper, NiisWebContext context, INumberGenerator numberGenerator)
 {
     _workflowApplier = workflowApplier;
     _mapper          = mapper;
     _context         = context;
     _numberGenerator = numberGenerator;
 }
Пример #8
0
 public RoleClaimsUpdater(
     RoleManager <ApplicationRole> roleManager,
     NiisWebContext context)
 {
     _roleManager = roleManager;
     _context     = context;
 }
Пример #9
0
 public TrademarkLogic(
     NiisWebContext context,
     IWorkflowApplier <Domain.Entities.Request.Request> workflowApplier)
     : base(workflowApplier, context)
 {
     _logicMap = new Dictionary <string, Func <Domain.Entities.Document.Document, Domain.Entities.Request.Request, Expression <Func <DicRouteStage, bool> > > >
     {
         { DicDocumentType.Codes.ExpertTmRegisterRefusalOpinion, RefusalConclusionLogic },
         { DicDocumentType.Codes.ExpertTmRegisterOpinion, RegistrationConclusionLogic },
         { DicDocumentType.Codes.ExpertTmRegistrationOpinionWithDisclaimer, RefusalConclusionLogic },
         { DicDocumentType.Codes.ExpertTmRegisterFinalOpinion, FinalRegistrationConclusionLogic },
         { DicDocumentType.Codes.ExpertTmRegistrationFinalOpinionWithApplicantConsent, FinalRegistrationConclusionLogic },
         { DicDocumentType.Codes.ExpertTmRegistrationFinalOpinionWithoutApplicantConsent, FinalRegistrationConclusionLogic },
         { DicDocumentType.Codes.NotificationOfTrademarkRequestRegistation, ReadyToFullExaminationForPred1Logic },
         { DicDocumentType.Codes.NotificationOfProvidelessOfficeWorkTermination, RequestlessWorkStopLogic },
         { DicDocumentType.Codes.RequestForPreExamination, SentRequestLogic },
         { DicDocumentType.Codes.ExpertRefusalOpinionFinal, FinalRejectionLogic },
         { DicDocumentType.Codes.NotificationOfPaymentlessOfficeWorkTermination, WaitStageExpiredWorkStopLogic },
         { DicDocumentType.Codes.NotificationOfRefusal, WaitStageExpiredWorkStopLogic },
         { DicDocumentType.Codes.NotificationOfAnswerlessOfficeWorkTermination, AnswerlessWorkStopLogic },
         { DicDocumentType.Codes.RequestForFullExamination, FullExaminationRequestLogic },
         { DicDocumentType.Codes.NotificationOfTmRegistration, PreparationToGosRegisterTransferLogic },
         { DicDocumentType.Codes.NotificationOfRegistrationExaminationTimeExpiration, RestorationWait88Logic },
         { DicDocumentType.Codes.NotificationOfAnswerTimeExpiration, RestorationWait89Logic },
         { DicDocumentType.Codes.NotificationOfTmRequestReviewingAcceptance, FullExaminationPaymentExpectationLogic },
         { DicDocumentType.Codes.NotificationOfFormalExaminationTimeExpiration, PreExaminationPaymentExpectationLogic },
         { DicDocumentType.Codes.NotificationOfRegistrationDecision, ReturnFromMinistryWhenLogic }
     };
 }
Пример #10
0
 protected BaseLogic(
     IWorkflowApplier <Domain.Entities.Request.Request> workflowApplier,
     NiisWebContext context)
 {
     _workflowApplier = workflowApplier;
     _context         = context;
 }
Пример #11
0
 public InventionLogic(
     NiisWebContext context,
     IWorkflowApplier <Domain.Entities.Request.Request> workflowApplier)
     : base(workflowApplier, context)
 {
     _logicMap = new Dictionary <string, Func <Domain.Entities.Document.Document, Domain.Entities.Request.Request, Expression <Func <DicRouteStage, bool> > > >
     {
         { DicDocumentType.Codes.NotificationForPaymentlessInventionRequest, PaymentlessInventionRequestLogic },
         { DicDocumentType.Codes.NotificationForInventionPaymentForIndividuals, ExpectPaymentLogic },
         { DicDocumentType.Codes.NotificationForInventionPaymentForBeneficiaries, ExpectPaymentLogic },
         { DicDocumentType.Codes.NotificationForPozitiveFormalExamination, ReadyToMeritsExaminationLogic },
         { DicDocumentType.Codes.NotificationOfRevocationOfPatentApplication, RestoreLogic },
         { DicDocumentType.Codes.NotificationForPaymentlessPozitiveFormalExamination, PaymentWaitLogic },
         { DicDocumentType.Codes.NotificationForSubstantiveExamination, PaymentWaitLogic },
         { DicDocumentType.Codes.RequestForFormalExamForInvention, ExaminationRequestLogic },
         { DicDocumentType.Codes.NotificationOfAnswerlessPatentRequestFinalRecall, RecallLogic },
         { DicDocumentType.Codes.NotificationOfPaymentlessExaminationFinalRecall, RecallLogic },
         { DicDocumentType.Codes.NotificationOfRevocationOfPaymentlessSubstantiveExamination, RecallLogic },
         { DicDocumentType.Codes.ReportOfSearch, SearchLogic },
         { DicDocumentType.Codes.ConclusionOfInventionPatentGrant, PatentGrantLogic },
         { DicDocumentType.Codes.ConclusionOfInventionPatentGrantRefuse, PatentRefuseLogic },
         { DicDocumentType.Codes.RequestForSubstantiveExamination, SubstantiveExaminationRequestLogic },
         { DicDocumentType.Codes.RequestForExaminationOfInventionPatentRequest, SubstantiveExaminationRequestLogic },
         { DicDocumentType.Codes.NotificationOfDecisionPatentGrant, PreparationToGosRegisterTransferLogic },
         { DicDocumentType.Codes.FreeFormNotification, FreeFormNotificationLogic },
     };
 }
Пример #12
0
 public IntegrationDocumentService(
     NiisWebContext niisWebContext,
     Configuration configuration)
 {
     _niisWebContext = niisWebContext;
     _configuration  = configuration;
 }
Пример #13
0
 public GetRequisitionInfoService(NiisWebContext niisContext,
                                  IntegrationAttachFileHelper integrationAttachFileHelper, IntegrationValidationHelper validationHelper)
 {
     _niisContext      = niisContext;
     _attachFileHelper = integrationAttachFileHelper;
     _validationHelper = validationHelper;
 }
Пример #14
0
        private static async Task UpdateTemplates(
            Dictionary <string, int> templateEntities,
            string templatesRootPath,
            NiisWebContext context,
            IHostingEnvironment hostingEnvironment)
        {
            foreach (var template in templateEntities)
            {
                var dbTemplate = await context.DocumentTemplateFiles.SingleAsync(x => x.Id == template.Value);

                var fileInfo = hostingEnvironment.ContentRootFileProvider
                               .GetFileInfo(Path.Combine(templatesRootPath, $"{template.Key}.docx"));

                if (fileInfo.LastModified < DateTimeOffset.Now.AddDays(-7))
                {
                    return;
                }

                var fileBytes = fileInfo
                                .CreateReadStream()
                                .ReadAsBytes();

                dbTemplate.File     = fileBytes;
                dbTemplate.FileType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
                dbTemplate.FileName = dbTemplate.FileName.Replace(".odt", ".docx");

                context.DocumentTemplateFiles.Update(dbTemplate);
            }
        }
Пример #15
0
 public WorkflowApplier(
     NiisWebContext context,
     INotificationSender notificationSender)
 {
     _context            = context;
     _notificationSender = notificationSender;
 }
Пример #16
0
 public WorkflowApplier(NiisWebContext context, ITaskRegister <Domain.Entities.Contract.Contract> taskRegister, INotificationSender notificationSender, ICalendarProvider calendarProvider)
 {
     _context            = context;
     _taskRegister       = taskRegister;
     _notificationSender = notificationSender;
     _calendarProvider   = calendarProvider;
 }
Пример #17
0
 public CommandHandler(
     NiisWebContext context,
     IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #18
0
 public CommandHandler(NiisWebContext context, IMapper mapper, ICustomerUpdater customerUpdater, IContractCategoryIdentifier categoryIdentifier)
 {
     _context            = context;
     _mapper             = mapper;
     _customerUpdater    = customerUpdater;
     _categoryIdentifier = categoryIdentifier;
 }
Пример #19
0
 public QueryHandler(NiisWebContext context,
                     IDocumentGeneratorFactory templateGeneratorFactory,
                     INotificationSender notificationSender)
 {
     _context = context;
     _templateGeneratorFactory = templateGeneratorFactory;
     _notificationSender       = notificationSender;
 }
Пример #20
0
 public CommandHandler(NiisWebContext context, IMapper mapper, ICustomerUpdater customerUpdater,
                       ILogoUpdater logoUpdater)
 {
     _context         = context;
     _mapper          = mapper;
     _customerUpdater = customerUpdater;
     _logoUpdater     = logoUpdater;
 }
Пример #21
0
 public QueryHandler(IMapper mapper, NiisWebContext context, IConfiguration configuration,
                     IFileStorage fileStorage)
 {
     _mapper        = mapper;
     _context       = context;
     _configuration = configuration;
     _fileStorage   = fileStorage;
     InitializeFormUploadFromConfig();
 }
Пример #22
0
 public CommandHandler(
     NiisWebContext context,
     IMapper mapper,
     IContractRequestRelationUpdater requestRelationUpdater)
 {
     _context = context;
     _mapper  = mapper;
     _requestRelationUpdater = requestRelationUpdater;
 }
Пример #23
0
 public GetMessageFileService(NiisWebContext niisWebContext, IntegrationValidationHelper validationHelper,
                              IntegrationAttachFileHelper attachFileHelper,
                              DictionaryHelper dictionaryHelper)
 {
     _niisWebContext   = niisWebContext;
     _validationHelper = validationHelper;
     _attachFileHelper = attachFileHelper;
     _dictionaryHelper = dictionaryHelper;
 }
Пример #24
0
 public DocumentsCompare(
     NiisWebContext context,
     IFileStorage fileStorage,
     IFileConverter fileConverter)
 {
     _context       = context;
     _fileStorage   = fileStorage;
     _fileConverter = fileConverter;
 }
Пример #25
0
 public CommandHandler(NiisWebContext context, IFileStorage fileStorage, IAttachmentHelper attachmentHelper,
                       IMapper mapper)
 {
     _context          = context;
     _fileStorage      = fileStorage;
     _attachmentHelper = attachmentHelper;
     _mapper           = mapper;
     _tempFolderPath   = Path.GetTempPath();
 }
Пример #26
0
 public DocumentService(
     NiisWebContext niisContext,
     IntegrationDictionaryHelper integrationDictionaryHelper,
     DictionaryHelper dictionaryHelper)
 {
     _niisWebContext = niisContext;
     _integrationDictionaryHelper = integrationDictionaryHelper;
     _dictionaryHelper            = dictionaryHelper;
 }
Пример #27
0
 public WorkflowApplier(
     NiisWebContext context,
     ITaskRegister <Domain.Entities.Request.Request> taskRegister,
     INotificationSender notificationSender)
 {
     _context            = context;
     _taskRegister       = taskRegister;
     _notificationSender = notificationSender;
 }
Пример #28
0
 public QueryHandler(
     NiisWebContext context,
     IDicTypeResolver dicTypeResolver,
     IMapper mapper)
 {
     _context         = context;
     _dicTypeResolver = dicTypeResolver;
     _mapper          = mapper;
 }
Пример #29
0
 public QueryHandler(
     NiisWebContext niisWebContext,
     IGetPayTariffService getPayTariffService,
     DictionaryHelper dictionaryHelper)
 {
     _niisWebContext      = niisWebContext;
     _getPayTariffService = getPayTariffService;
     _dictionaryHelper    = dictionaryHelper;
 }
Пример #30
0
 public static void DetachAll(NiisWebContext context)
 {
     foreach (var entityEntry in context.ChangeTracker.Entries().ToArray())
     {
         if (entityEntry.Entity != null)
         {
             entityEntry.State = EntityState.Detached;
         }
     }
 }