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); }
public DataService(ClientQueryDeserializer queryDeserializer, ChangeSetDeserializer changeSetDeserializer, IChangeSetApplier changeSetApplier, IUnitOfWorkFactory unitOfWorkFactory, TETypeLookupStructureDataProvider teTypeLookupStructureDataProvider) : base(queryDeserializer, changeSetDeserializer, changeSetApplier, unitOfWorkFactory) { Contract.Requires(teTypeLookupStructureDataProvider != null); StructureDataProviders.Add(teTypeLookupStructureDataProvider); CommittableBindingsProvider.Register(teTypeLookupStructureDataProvider); }
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); }
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); }
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); }
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); }
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(); } }
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); }
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); }