コード例 #1
0
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            ISessionFactory factory,
            TypedAutoCardStructureDataProvider <CstReqCustoms> cstReqCustomsStructureDataProvider,
            TransportDocumentStructureDataProvider transportDocumentStructureDataProvider,
            TransportContractStructureDataProvider transportContractStructureDataProvider,
            CstReqCustomsPosDataProvider cstReqCustomsPosDataProvider,
            CstReqCustoms2WBStructureDataProvider cstReqCustoms2WbStructureDataProvider
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            _factory = factory;
            StructureDataProviders.Add(cstReqCustomsStructureDataProvider);
            StructureDataProviders.Add(transportDocumentStructureDataProvider);
            StructureDataProviders.Add(transportContractStructureDataProvider);
            StructureDataProviders.Add(cstReqCustomsPosDataProvider);
            StructureDataProviders.Add(cstReqCustoms2WbStructureDataProvider);

            CommittableBindingsProvider.Register(cstReqCustomsStructureDataProvider);
            CommittableBindingsProvider.Register(transportDocumentStructureDataProvider);
            CommittableBindingsProvider.Register(transportContractStructureDataProvider);
        }
コード例 #2
0
        public DataService(ClientQueryDeserializer queryDeserializer,
                           ChangeSetDeserializer changeSetDeserializer,
                           IChangeSetApplier changeSetApplier,
                           IUnitOfWorkFactory unitOfWorkFactory,
                           TETypeLookupStructureDataProvider teTypeLookupStructureDataProvider)
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            Contract.Requires(teTypeLookupStructureDataProvider != null);

            StructureDataProviders.Add(teTypeLookupStructureDataProvider);
        }
コード例 #3
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            TypedAutoGridStructureDataProvider <YInternalTrafficMonitor> internalTrafficMonitorStructureDataProvider,
            ISessionFactory factory
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            _factory = factory;
            StructureDataProviders.Add(internalTrafficMonitorStructureDataProvider);

            //CommittableBindingsProvider.Register(internalTrafficStructureDataProvider);
        }
コード例 #4
0
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            WorkerCardStructureDataProvider workerStructureDataProvider,
            TypedAutoGridStructureDataProvider <WmsAddressBook> addressListStructureDataProvider
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            StructureDataProviders.Add(workerStructureDataProvider);
            StructureDataProviders.Add(addressListStructureDataProvider);

            CommittableBindingsProvider.Register(workerStructureDataProvider);
        }
コード例 #5
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            PassRequestCardStructureDataProvider cardStructureDataProvider,
            PassRequestListStructureDataProvider listStructureDataProvider
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            StructureDataProviders.Add(cardStructureDataProvider);
            StructureDataProviders.Add(listStructureDataProvider);

            CommittableBindingsProvider.Register(cardStructureDataProvider);
            CommittableBindingsProvider.Register(listStructureDataProvider);
        }
コード例 #6
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            CustomUnitOfWorkFactory unitOfWorkFactory,
            ExternalTrafficCreateStructureDataProvider externalTrafficCreateStructureDataProvider,
            InternalTrafficCreateStructureDataProvider internalTrafficCreateStructureDataProvider
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            StructureDataProviders.Add(externalTrafficCreateStructureDataProvider);
            StructureDataProviders.Add(internalTrafficCreateStructureDataProvider);

            CommittableBindingsProvider.Register(externalTrafficCreateStructureDataProvider);
            CommittableBindingsProvider.Register(internalTrafficCreateStructureDataProvider);
        }
コード例 #7
0
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            ExternalTrafficStructureDataProvider externalTrafficStructureDataProvider,
            InternalTrafficSubListStructureDataProvider internalTrafficSubListStructureDataProvider,
            ISessionFactory factory
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            _factory = factory;
            StructureDataProviders.Add(externalTrafficStructureDataProvider);
            StructureDataProviders.Add(internalTrafficSubListStructureDataProvider);

            CommittableBindingsProvider.Register(externalTrafficStructureDataProvider);
            CommittableBindingsProvider.Register(internalTrafficSubListStructureDataProvider);
        }
コード例 #8
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public override void Commit(JObject jsChangeSet)
        {
            Contract.Requires(!CommittableBindingsProvider.IsEmpty,
                              "CommitableBindingsProvider пуст, поэтому ни одна сущность не может быть сохранена. Скорее в конструкторе в него забыли добавить FieldBinding-и на структуры, которые можно сохранять");

            var changeSet = ChangeSetDeserializer.Deserialize(jsChangeSet,
                                                              CommittableBindingsProvider.ComposeDataContextModel(StructureDataProviders));

            using (var uow = UnitOfWorkFactory.StartNew())
            {
                var cuow = (CustomUnitOfWork)uow;

                // применяем
                ChangeSetApplier.Apply(changeSet, CommittableBindingsProvider, uow);

                // запускаем логику обработки
                ProcessSavingLogic(cuow);
                uow.Commit();
            }
        }
コード例 #9
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public DataService(
            ClientQueryDeserializer queryDeserializer,
            IChangeSetApplier changeSetApplier,
            ChangeSetDeserializer changeSetDeserializer,
            IUnitOfWorkFactory unitOfWorkFactory,
            TypedAutoCardStructureDataProvider <SchJob> jobStructureDataProvider,
            TypedAutoGridStructureDataProvider <SchJobParam> jobParamListStructureDataProvider,
            TypedAutoGridStructureDataProvider <SchCronTrigger> cronTriggerStructureDataProvider,
            TypedAutoGridStructureDataProvider <SchSimpleTrigger> simpleTriggerStructureDataProvider
            )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            StructureDataProviders.Add(jobStructureDataProvider);
            StructureDataProviders.Add(jobParamListStructureDataProvider);
            StructureDataProviders.Add(cronTriggerStructureDataProvider);
            StructureDataProviders.Add(simpleTriggerStructureDataProvider);

            CommittableBindingsProvider.Register(jobStructureDataProvider);
            CommittableBindingsProvider.Register(jobParamListStructureDataProvider);
            CommittableBindingsProvider.Register(cronTriggerStructureDataProvider);
            CommittableBindingsProvider.Register(simpleTriggerStructureDataProvider);
        }
コード例 #10
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public DataService(ClientQueryDeserializer queryDeserializer,
                           ChangeSetDeserializer changeSetDeserializer,
                           IChangeSetApplier changeSetApplier,
                           IUnitOfWorkFactory unitOfWorkFactory,
                           CargoIwbCardStructureDataProvider cargoIwbCardStructureDataProvider,
                           CargoIwbLookupStructureDataProvider cargoIwbLookupStructureDataProvider,
                           CargoIwbPosByIwbGridStructureDataProvider cargoIwbPosByIwbGridStructureDataProvider,
                           CargoIwbPosGridStructureDataProvider cargoIwbPosGridStructureDataProvider,
                           Iwb2CargoGridStructureDataProvider iwb2CargoGridStructureDataProvider,
                           IwbCardStructureDataProvider iwbCardStructureDataProvider,
                           IwbGridStructureDataProvider iwbGridStructureDataProvider
                           )
            : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory)
        {
            Contract.Requires(cargoIwbCardStructureDataProvider != null);
            Contract.Requires(cargoIwbLookupStructureDataProvider != null);
            Contract.Requires(cargoIwbPosByIwbGridStructureDataProvider != null);
            Contract.Requires(cargoIwbPosGridStructureDataProvider != null);
            Contract.Requires(iwb2CargoGridStructureDataProvider != null);
            Contract.Requires(iwbCardStructureDataProvider != null);
            Contract.Requires(iwbGridStructureDataProvider != null);

            StructureDataProviders.Add(cargoIwbCardStructureDataProvider);
            StructureDataProviders.Add(cargoIwbLookupStructureDataProvider);
            StructureDataProviders.Add(cargoIwbPosByIwbGridStructureDataProvider);
            StructureDataProviders.Add(cargoIwbPosGridStructureDataProvider);
            StructureDataProviders.Add(iwb2CargoGridStructureDataProvider);
            StructureDataProviders.Add(iwbCardStructureDataProvider);
            StructureDataProviders.Add(iwbGridStructureDataProvider);

            CommittableBindingsProvider.Register(cargoIwbCardStructureDataProvider);
            CommittableBindingsProvider.Register(cargoIwbPosByIwbGridStructureDataProvider);
            CommittableBindingsProvider.Register(cargoIwbPosGridStructureDataProvider);
            CommittableBindingsProvider.Register(iwb2CargoGridStructureDataProvider);
            CommittableBindingsProvider.Register(iwbCardStructureDataProvider);
        }