public static AxBaseException UpdateProductAttributes(int actionId) { var ecoResValue = ServiceConnector.CallService <AGREcoResValueDTO>(actionId, "GetValue", "AGRAttributeService", "[ax].[ECORESVALUE]", 10000); if (ecoResValue != null) { return(ecoResValue.Result); } var ecoResAttribute = ServiceConnector.CallService <AGREcoResAttributeDTO>(actionId, "GetAttribute", "AGRAttributeService", "[ax].[ECORESATTRIBUTE]", 10000); if (ecoResAttribute != null) { return(ecoResAttribute.Result); } var ecoResAttributeValue = ServiceConnector.CallService <AGREcoResAttributeValueDTO>(actionId, "GetAttributeValue", "AGRAttributeService", "[ax].[ECORESATTRIBUTEVALUE]", 10000); if (ecoResAttributeValue != null) { return(ecoResAttributeValue.Result); } var ecoResAttributeType = ServiceConnector.CallService <AGREcoResAttributeTypeDTO>(actionId, "GetAttributeType", "AGRAttributeService", "[ax].[ECORESATTRIBUTEType]", 10000); if (ecoResAttributeType != null) { return(ecoResAttributeType.Result); } var ecoResEnum = ServiceConnector.CallService <AGREcoResEnumerationAttributeValueDTO>(actionId, "GetEnumerationAttributeValue", "AGRAttributeService", "[ax].[ECORESENUMERATIONATTRIBUTETYPEVALUE]", 10000); if (ecoResEnum != null) { return(ecoResEnum.Result); } var ecoResCatAttr = ServiceConnector.CallService <AGREcoResCategoryAttributeDTO>(actionId, "GetCategoryAttribute", "AGRAttributeService", "[ax].[ECORESCATEGORYATTRIBUTE]", 10000); if (ecoResCatAttr != null) { return(ecoResCatAttr.Result); } var ecoResProdInstance = ServiceConnector.CallService <AGREcoResProductInstanceDTO>(actionId, "GetProductInstanceValue", "AGRAttributeService", "[ax].[ECORESPRODUCTINSTANCEVALUE]", 10000); if (ecoResProdInstance != null) { return(ecoResProdInstance.Result); } //var prodAttributes = ServiceConnector.CallOdataEndpoint<ProductAttribute>("ProductAttributes", null, "[ax].[ProductAttributes]", actionId); //var prodAttributeValues = ServiceConnector.CallOdataEndpoint<ProductAttributeValue>("ProductAttributeValues", null, "[ax].[ProductAttributeValues]", actionId); return(null); }
public static AxBaseException WriteSalesValueTransLines(int actionId) { return(ServiceConnector.CallService <RetailTransactionSalesLinesDTO>(actionId, "GetRetailTransLines", "AGRRetailTransService", "[ax].[RetailTransactionSalesLines]", 5000).Result); }
public AxBaseException WriteInventTransOrigin() { return(ServiceConnector.CallService <InventTransOriginDTO>(ActionId, "GetInventTransOrigin", "AGRInventTransService", "[ax].[INVENTTRANSORIGIN]", 5000).Result); }
public AxBaseException WriteInventSumFull() { return(ServiceConnector.CallService <InventSumDTO>(ActionId, "GetInventSum", "AGRItemCustomService", "[ax].[INVENTSUM]", 5000).Result); }
public static AxBaseException WriteItems(bool includeFashion, int actionId) { var productMaster = ServiceConnector.CallOdataEndpoint <ProductMasterReadDTO>("ProductMasters", "", "[ax].[ProductMaster]", actionId).Result; //if (productMaster != null) //{ // return productMaster; //} var releasedMasters = ServiceConnector.CallOdataEndpointWithPageSize <ReleasedProductMaster>("ReleasedProductMasters", 2000, "[ax].[ReleasedProductMaster]", actionId).Result; //if (releasedMasters != null) //{ // return releasedMasters; //} var distinctProducts = ServiceConnector.CallOdataEndpoint <DistinctProductsDTO>("DistinctProducts", "", "[ax].[DistinctProduct]", actionId).Result; //if (distinctProducts != null) //{ // return distinctProducts; //} var items = ServiceConnector.CallOdataEndpointWithPageSize <ReleasedDistinctProduct>("ReleasedDistinctProducts", 2000, "[ax].[ReleasedDistinctProducts]", actionId).Result; //if (items != null) //{ // return items; //} var inventDim = ServiceConnector.CallOdataEndpoint <InventDimDTO>("InventDims", "", "[ax].[INVENTDIM]", actionId).Result; //if (inventDim != null) //{ // return inventDim; //} var invTableModule = ServiceConnector.CallOdataEndpoint <TableModule>("TableModules", "", "[ax].[INVENTTABLEMODULE]", actionId).Result; //if (invTableModule != null) //{ // return invTableModule; //} var custVendExt = ServiceConnector.CallOdataEndpoint <CustVendExternalItem>("CustVendExternalItems", "", "[ax].[CUSTVENDEXTERNALITEM]", actionId).Result; //if (custVendExt != null) //{ // return custVendExt; //} var variants = ServiceConnector.CallOdataEndpoint <ReleasedProductVariant>("ReleasedProductVariants", "", "[ax].[ReleasedProductVariants]", actionId).Result; //if (variants != null) //{ // return variants; //} var combos = ServiceConnector.CallOdataEndpoint <InventDimComboDTO>("InventDimCombinations", "", "[ax].[INVENTDIMCOMBINATIONS]", actionId).Result; //if (combos != null) //{ // return combos; //} //var assortLookup = WriteServiceData<RetailAssortmentLookupDTO>("[ax].[RETAILASSORTMENTLOOKUP]", "GetRetailAssortmentLookup"); //if (assortLookup != null) //{ // return assortLookup; //} var retailChannelLookup = ServiceConnector.CallService <RetailAssortmentLookupChannelGroupDTO>(actionId, "GetRetailAssortmentLookupChannelGroup", "AGRItemCustomService", "[ax].[RETAILASSORTMENTLOOKUPCHANNELGROUP]", 10000); //if (retailChannelLookup != null) //{ // return retailChannelLookup; //} var reqItems = ServiceConnector.CallOdataEndpoint <AGRReqItemTable>("AGRReqItemTables", "", "[ax].[REQITEMTABLE]", actionId).Result; //if (reqItems != null) //{ // return reqItems; //} var reqKey = ServiceConnector.CallOdataEndpoint <AGRReqSafetyKey>("AGRReqSafetyKeys", "", "[ax].[REQSAFETYKEY]", actionId).Result; //if (reqKey != null) //{ // return reqKey; //} var saftyLines = ServiceConnector.CallService <ReqSafetyLineDTO>(actionId, "GetSafetyLines", "AGRItemCustomService", "[ax].[REQSAFETYLINE]", 5000); //if (saftyLines != null) //{ // return saftyLines; //} // item_order_routes var itemPurchSetup = ServiceConnector.CallOdataEndpoint <ItemPurchSetup>("ItemPurchSetups", "", "[ax].[INVENTITEMPURCHSETUP]", actionId).Result; //if (itemPurchSetup != null) //{ // return itemPurchSetup; //} var itemInventSetup = ServiceConnector.CallOdataEndpoint <ItemInventSetup>("ItemInventSetups", "", "[ax].[INVENTITEMINVENTSETUP]", actionId).Result; //if (itemInventSetup != null) //{ // return itemInventSetup; //} var unitOfMeasure = ServiceConnector.CallService <UnitOfMeasureDTO>(actionId, "GetUnitOfMeasure", "AGRItemCustomService", "[ax].[UNITOFMEASURE]", 5000); //if (unitOfMeasure != null) //{ // return unitOfMeasure; //} var unitConv = ServiceConnector.CallService <UnitOfMeasureConversionDTO>(actionId, "GetUnitOfMeasureConversion", "AGRItemCustomService", "[ax].[UNITOFMEASURECONVERSION]", 5000); //if (unitConv != null) //{ // return unitConv; //} if (includeFashion) { ////var inventSeason = context.InventSeasonTables.ToList().GetDataReader<InventSeasonTable>(); //// DataWriter.WriteToTable<InventSeasonTable>(inventSeason, "[ax].[InventSeasonTable]"); ////WriteServiceData<InventColorSeasonDTO>("[ax].[InventColorSeason]", "GetInventSeasonColor"); // var inventColorSeason = GetFromService<InventColorSeasonDTO>("AGRFashionServiceGroup", "AGRFashionService", "GetInventSeasonColor", null); // if (inventColorSeason.Exception != null) // { // return inventColorSeason.Exception; // } // DataWriter.WriteToTable(inventColorSeason.value.GetDataReader(), "[ax].[InventColorSeason]"); } return(null); }
public static AxBaseException PullPurchTable(int actionId) { return(ServiceConnector.CallService <PurchTableDTO>(actionId, "GetPurchTable", "AGRInventTransService", "[ax].[PurchTable]", 10000).Result); }
private static AxBaseException PullTOTable(int actionId) { return(ServiceConnector.CallService <InventTransferTableDTO>(actionId, "GetInventTransferTable", "AGRItemCustomService", "[ax].[INVENTTRANSFERTABLE]", 10000).Result); }
private static AxBaseException PullTOLines(int actionId) { return(ServiceConnector.CallService <InventTransferLineDTO>(actionId, "GetInventTransferLines", "AGRItemCustomService", "[ax].[INVENTTRANSFERLINE]", 5000).Result); }
private static AxBaseException PullPurchLines(int actionId) { return(ServiceConnector.CallService <PurchLinesDTO>(actionId, "GetPurchLine", "AGRInventTransService", "[ax].[PurchLine]", 10000).Result); }