mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-25 09:07:15 +00:00
Feature repricing min max (#10)
amazon settlement import/export improvements
This commit is contained in:
67
src/bnhtrade.ComTypeLib/ILMerge.props
Normal file
67
src/bnhtrade.ComTypeLib/ILMerge.props
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!-- -->
|
||||
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
|
||||
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
|
||||
<!-- -->
|
||||
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
|
||||
|
||||
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
|
||||
<ILMergeTransitive>true</ILMergeTransitive>
|
||||
|
||||
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
|
||||
<ILMergeLibraryPath></ILMergeLibraryPath>
|
||||
|
||||
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
|
||||
<ILMergePackagesPath></ILMergePackagesPath>
|
||||
|
||||
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
|
||||
<ILMergeOrderFile></ILMergeOrderFile>
|
||||
|
||||
<!-- The strong key file name if not specified in the project -->
|
||||
<ILMergeKeyFile></ILMergeKeyFile>
|
||||
|
||||
<!-- The assembly version if differs for the version of the main assembly -->
|
||||
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
|
||||
|
||||
<!-- added in Version 1.0.4 -->
|
||||
<ILMergeFileAlignment></ILMergeFileAlignment>
|
||||
|
||||
<!-- added in Version 1.0.4, default=none -->
|
||||
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
|
||||
|
||||
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
|
||||
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
|
||||
|
||||
<!-- See ILMerge documentation -->
|
||||
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
|
||||
|
||||
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
|
||||
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
||||
|
||||
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
||||
<ILMergeDebugInfo>false</ILMergeDebugInfo>
|
||||
|
||||
<!-- Target assembly will be delay signed -->
|
||||
<ILMergeDelaySign></ILMergeDelaySign>
|
||||
|
||||
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
|
||||
<ILMergeInternalize></ILMergeInternalize>
|
||||
|
||||
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
|
||||
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
|
||||
|
||||
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
|
||||
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
|
||||
|
||||
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
|
||||
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
|
||||
|
||||
<!-- Types with the same name are all merged into a single type in the target assembly -->
|
||||
<ILMergeUnionMerge></ILMergeUnionMerge>
|
||||
|
||||
<!-- The version of the target framework, default 40 (works for 45 too) -->
|
||||
<ILTargetPlatform></ILTargetPlatform>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
4
src/bnhtrade.ComTypeLib/ILMergeOrder.txt
Normal file
4
src/bnhtrade.ComTypeLib/ILMergeOrder.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
# this file contains the partial list of the merged assemblies in the merge order
|
||||
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
|
||||
# and finetune merge order to your satisfaction
|
||||
|
||||
@@ -64,22 +64,24 @@ namespace bnhtrade.ComTypeLib
|
||||
|
||||
public string ProductCompetitivePriceGet(int productId, int conditionId, ConnectionCredential sqlConnCred)
|
||||
{
|
||||
var request = new Core.Product.ProductQuery();
|
||||
(decimal? price, DateTime? priceDate) result = request.ProductCompetitivePriceGet(sqlConnCred.ConnectionString, productId, conditionId);
|
||||
if (result.price == null || result.priceDate == null)
|
||||
var compPrice = new Core.Logic.Product.GetCompetitivePrice(sqlConnCred.ConnectionString).Execute(productId, conditionId);
|
||||
|
||||
if (compPrice == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime priceDate2 = result.priceDate.Value;
|
||||
return result.price.ToString() + ";" + priceDate2.ToOADate();
|
||||
return compPrice.Price + ";" + compPrice.PriceDatetime.ToOADate();
|
||||
}
|
||||
}
|
||||
public int ProductCompetitivePriceSet(int productId, int conditionId, [MarshalAs(UnmanagedType.Currency)] decimal price, bool isBuyBoxPrice, DateTime priceDate, ConnectionCredential sqlConnCred)
|
||||
|
||||
public int ProductCompetitivePriceSet(int productId, int conditionId, [MarshalAs(UnmanagedType.Currency)] decimal price, bool isBuyBoxPrice, DateTime priceDateLocal, ConnectionCredential sqlConnCred)
|
||||
{
|
||||
var request = new Core.Product.ProductQuery();
|
||||
return request.ProductCompetitivePriceSet(sqlConnCred.ConnectionString, productId, conditionId, price, isBuyBoxPrice, priceDate);
|
||||
priceDateLocal = DateTime.SpecifyKind(priceDateLocal, DateTimeKind.Local);
|
||||
|
||||
return new Core.Data.Database.Product.CreateCompetitivePrice(sqlConnCred.ConnectionString)
|
||||
.ProductCompetitivePriceSet(productId, conditionId, price, isBuyBoxPrice, priceDateLocal);
|
||||
}
|
||||
|
||||
public void ProductUpdateAmazonEstimateFee(ConnectionCredential sqlConnCred, object inputList)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace bnhtrade.ComTypeLib
|
||||
{
|
||||
entryDate = DateTime.SpecifyKind(entryDate, DateTimeKind.Utc);
|
||||
|
||||
return Core.Stock.StockJournal.StockReallocateByStockId(sqlConnCred.ConnectionString, 4, stockId, quantity, debitStatusId, creditStatusId, entryDate);
|
||||
return new Core.Logic.Stock.Reallocate(sqlConnCred.ConnectionString).StockReallocateByStockId(4, stockId, quantity, debitStatusId, creditStatusId, entryDate);
|
||||
}
|
||||
|
||||
public void StockJournalDelete(ConnectionCredential sqlConnCred, int stockJournalId)
|
||||
@@ -71,10 +71,11 @@ namespace bnhtrade.ComTypeLib
|
||||
|
||||
public object ReconcileStockTransactions(ConnectionCredential sqlConnCred)
|
||||
{
|
||||
var request = new Core.Stock.StockReconciliation();
|
||||
var result = new Core.Stock.StockReconciliation.ReconcileStockTransactionsResult();
|
||||
//var request = new Core.Stock.StockReconciliation();
|
||||
//var result = new Core.Stock.StockReconciliation.ReconcileStockTransactionsResult();
|
||||
|
||||
result = request.ReconcileStockTransactions(sqlConnCred.ConnectionString, false);
|
||||
var result = new Core.Logic.Stock.SkuTransactionReconcile(sqlConnCred.ConnectionString);
|
||||
result.ReconcileStockTransactions(false);
|
||||
|
||||
//ReconcileStockTransactionsResult returnObject = new ReconcileStockTransactionsResult();
|
||||
|
||||
@@ -106,8 +107,8 @@ namespace bnhtrade.ComTypeLib
|
||||
object[] returnArray = new object[7];
|
||||
returnArray[0] = result.ReconciliationComplete;
|
||||
returnArray[1] = result.ProgressMessage;
|
||||
returnArray[2] = result.StockTransactionId;
|
||||
returnArray[3] = result.StockTransactionTypeId;
|
||||
returnArray[2] = result.CurrentTransactionId;
|
||||
returnArray[3] = result.CurrentTransactionTypeId;
|
||||
returnArray[4] = result.LastItemDateTime;
|
||||
returnArray[5] = result.ItemsCompleted;
|
||||
returnArray[6] = result.ItemsRemaining;
|
||||
|
||||
11
src/bnhtrade.ComTypeLib/app.config
Normal file
11
src/bnhtrade.ComTypeLib/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props" Condition="Exists('..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" />
|
||||
<Import Project="..\..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -13,6 +15,8 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -30,6 +34,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
||||
@@ -54,13 +59,20 @@
|
||||
<Compile Include="Stock\Stock.cs" />
|
||||
<Compile Include="Utility\LoadComObjextIntoStringArray.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="ILMerge.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\bnhtrade.Core\bnhtrade.Core.csproj">
|
||||
<Project>{339d7413-3da7-46ea-a55c-255a9a6b95eb}</Project>
|
||||
<Name>bnhtrade.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ILMergeOrder.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
@@ -71,4 +83,13 @@
|
||||
copy "$(SolutionDir)build\bnhtrade.ComTypeLib.RegAsmRefresh.bat" "$(TargetDir)bnhtrade.ComTypeLib.RegAsmRefresh.bat"
|
||||
copy "$(SolutionDir)build\bnhtrade.ComTypeLib.RegAsmUninstall.bat" "$(TargetDir)bnhtrade.ComTypeLib.RegAsmUninstall.bat"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets" Condition="Exists('..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" />
|
||||
</Project>
|
||||
5
src/bnhtrade.ComTypeLib/packages.config
Normal file
5
src/bnhtrade.ComTypeLib/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net471" />
|
||||
<package id="MSBuild.ILMerge.Task" version="1.1.3" targetFramework="net471" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user