public InventoryItemMaintBase() { INSetup record = insetup.Current; SOSetup soSetup = sosetup.Current; CommonSetup commonSetup = commonsetup.Current; PXUIFieldAttribute.SetVisible <INUnit.toUnit>(itemunits.Cache, null, false); PXUIFieldAttribute.SetEnabled <INUnit.toUnit>(itemunits.Cache, null, false); PXUIFieldAttribute.SetVisible <INUnit.sampleToUnit>(itemunits.Cache, null, true); PXUIFieldAttribute.SetEnabled <INUnit.sampleToUnit>(itemunits.Cache, null, false); PXUIFieldAttribute.SetVisible <INUnit.priceAdjustmentMultiplier>(itemunits.Cache, null, soSetup?.UsePriceAdjustmentMultiplier == true); PXDBDefaultAttribute.SetDefaultForInsert <INItemXRef.inventoryID>(itemxrefrecords.Cache, null, true); }
protected ContractProcessing(int?contractID) { if (contractID > 0) { this.graph = PXGraph.CreateInstance <ARInvoiceEntry>(); graph.FieldVerifying.AddHandler <ARInvoice.projectID>((PXCache sender, PXFieldVerifyingEventArgs e) => { e.Cancel = true; }); this.contract = PXSelect <Contract, Where <Contract.contractID, Equal <Required <Contract.contractID> > > > .Select(graph, contractID); this.commonsetup = PXSelect <CommonSetup> .Select(graph); this.template = PXSelect <Contract, Where <Contract.contractID, Equal <Required <Contract.contractID> > > > .Select(graph, contract.TemplateID); this.schedule = PXSelect <ContractBillingSchedule> .Search <ContractBillingSchedule.contractID>(graph, contract.ContractID); if (contract.CustomerID != null) { if (schedule != null && schedule.AccountID != null) { customer = PXSelect <Customer, Where <Customer.bAccountID, Equal <Required <ContractBillingSchedule.accountID> > > > .Select(graph, schedule.AccountID); if (schedule.LocationID != null) { location = PXSelect <Location, Where <Location.bAccountID, Equal <Required <ContractBillingSchedule.accountID> >, And <Location.locationID, Equal <Required <ContractBillingSchedule.locationID> > > > > .Select(graph, customer.BAccountID, schedule.LocationID); } else { location = PXSelect <Location, Where <Location.bAccountID, Equal <Required <Customer.bAccountID> >, And <Location.locationID, Equal <Required <Customer.defLocationID> > > > > .Select(graph, customer.BAccountID, customer.DefLocationID); } } else { customer = PXSelect <Customer, Where <Customer.bAccountID, Equal <Required <Customer.bAccountID> > > > .Select(graph, contract.CustomerID); if (contract.LocationID != null) { location = PXSelect <Location, Where <Location.bAccountID, Equal <Required <ContractBillingSchedule.accountID> >, And <Location.locationID, Equal <Required <ContractBillingSchedule.locationID> > > > > .Select(graph, customer.BAccountID, contract.LocationID); } else { location = PXSelect <Location, Where <Location.bAccountID, Equal <Required <Customer.bAccountID> >, And <Location.locationID, Equal <Required <Customer.defLocationID> > > > > .Select(graph, customer.BAccountID, customer.DefLocationID); } } } SetupGraph(); } }
public static IWindsorContainer Setup() { //Container.GetContainer().AddFacility("logging", new LoggingFacility(LoggerImplementation.Log4net, "EdiDocsIn.log4net.xml")); CommonSetup.Setup(); Container.Register <IBusinessPartnerSpecificServiceResolver, BusinessPartnerSpecificServiceResolver>(); Container.Register <IFileUtilities, FileUtilities>("fileUtilities"); // Container.Register<IFileCreationService, FedexFileCreationService>("FEDEXFileService"); Container.Register <IDocumentParser <OrderRequestReceivedMessage>, Fedex850Parser>(); Container.Register <ISplitter, Splitter>(); Container.Register <IAddressParser, AddressParser>(); Container.Register <IPOLineParser, Fedex850LineParser>(); Container.Register <ICreateOrderMessagePublisher, CreateOrderMessagePublisher>(); Container.Register <IAFPSTConfiguration, AFPSTConfiguration>(); Container.Register <ICreateEdiContentFrom <OrderRequestReceivedMessage>, Fedex855Creator>(); Container.Register <IBuildValueFactory, FedExBuildValueFactory>(); Container.Register <ISegmentFactory, SegmentFactory>("segFactory"); var configuration = Container.Resolve <IAFPSTConfiguration>(); var connectionKey = configuration.TestMode == false ? "SQLConnection" : "SQLConnectionTest"; var createnewTables = configuration.TestMode; Container.Register <ISessionSource, EdiSessionSource>(typeof(EdiSessionSource).Name) .WithDependencies(new { connectionKey, createnewTables }); Container.Register <IControlNumberRepository, ControlNumberRepository>("controlNumRepo", LifestyleType.Transient); Container.Register <IIncomingDocumentsRepository, IncomingDocumentsRepository>("incomingDocsRepository", LifestyleType.Transient); Container.Register <IFileProcessingService, FedexFileProcessingService>(); Container.Register <IEDIResponseReferenceRecorder, EDIResponseReferenceRecorder>(); Container.Register <IFedexFileParser, FedexFileParser>("srv").WithDependencies(new { elDelim = "~", segDelim = @"\" }); return(Container.GetContainer()); }