mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 22:47:15 +00:00
Feature: Sync MWS Shipment with Database
Various restructuring and misc. features added. Removed reliance on ABrain Amazon MWS NuGet package, added Amazon's own C# lib
This commit is contained in:
@@ -5,10 +5,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Core;
|
||||
using Core.Stock;
|
||||
using System.Configuration;
|
||||
using System.Transactions;
|
||||
using bnhtrade.Core;
|
||||
using bnhtrade.Core.Stock;
|
||||
|
||||
namespace bnhtradeScheduledTasks
|
||||
{
|
||||
@@ -251,7 +251,7 @@ namespace bnhtradeScheduledTasks
|
||||
Console.Clear();
|
||||
//try
|
||||
//{
|
||||
Core.Inventory.InventoryPricing.AmazonMinMaxTemp(sqlConnectionString);
|
||||
bnhtrade.Core.Inventory.InventoryPricing.AmazonMinMaxTemp(sqlConnectionString);
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
@@ -273,14 +273,15 @@ namespace bnhtradeScheduledTasks
|
||||
Console.WriteLine(consoleHeader);
|
||||
Console.WriteLine("Main Menu > Dev Funcions");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("<1> Test Import of Amazon Settlement Data into Account Transaction Table");
|
||||
Console.WriteLine("<1> Get Amazon UTC time");
|
||||
Console.WriteLine("<2> Test Stock Journal Reallocate");
|
||||
Console.WriteLine("<3> test Product Update Amazon Estimate Fee");
|
||||
Console.WriteLine("<4> Process Amazon Reimbursement Report (into transactiontable)");
|
||||
Console.WriteLine("<5> Test Stock Table Delete");
|
||||
Console.WriteLine("<6> Test Owner intro insert");
|
||||
Console.WriteLine("<7> Currency exchange rate insert");
|
||||
Console.WriteLine("<8> Update Amazon Inventory Table");
|
||||
Console.WriteLine("<8> SQL Loop function");
|
||||
Console.WriteLine("<9> Inbound shipment test");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("<0> Back");
|
||||
Console.WriteLine("");
|
||||
@@ -294,8 +295,10 @@ namespace bnhtradeScheduledTasks
|
||||
else if (input == "1")
|
||||
{
|
||||
Console.Clear();
|
||||
var task = new StockReconciliation();
|
||||
task.WIP_ProcessAmazonSettlementData(sqlConnectionString);
|
||||
|
||||
var task = new bnhtrade.Core.Data.AmazonMWS.CurrentDateTime();
|
||||
task.GetUtc();
|
||||
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
@@ -383,19 +386,25 @@ namespace bnhtradeScheduledTasks
|
||||
else if (input == "8")
|
||||
{
|
||||
Console.Clear();
|
||||
try
|
||||
{
|
||||
TempStuff.TempTasks.test_AmazonInventoryTableUpdate();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
var jjjj = new bnhtrade.Core.Test.InboundShipmentInfo(sqlConnectionString);
|
||||
jjjj.GetMWSInfo();
|
||||
|
||||
//Console.WriteLine(result.ToString());
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
else if (input == "9")
|
||||
{
|
||||
Console.Clear();
|
||||
|
||||
var bob = new bnhtrade.Core.Test.InboundShipmentInfo(sqlConnectionString);
|
||||
bob.Test();
|
||||
|
||||
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -530,7 +539,7 @@ namespace TempStuff
|
||||
DateTime entrdate = DateTime.Parse("07/09/2016 08:13:54");
|
||||
|
||||
//return bnhtradeDatabaseClient.Purchase.PurchaseQuery.WIP_PurchaseLineNetTransactionInsert(sqlConnectionString, 10164, "GBP", 138, 9.98m, entrdate);
|
||||
Core.Purchase.PurchaseQuery.WIP_PurchaseLineTransactionNetUpdate(sqlConnectionString, 10164, "GBP", 138, 100000);
|
||||
bnhtrade.Core.Purchase.PurchaseQuery.WIP_PurchaseLineTransactionNetUpdate(sqlConnectionString, 10164, "GBP", 138, 100000);
|
||||
}
|
||||
public static void test_ProductUpdateAmazonEstimateFee()
|
||||
{
|
||||
@@ -538,7 +547,7 @@ namespace TempStuff
|
||||
|
||||
list.Add(("B000MGVBG4", 1.99m));
|
||||
|
||||
Core.Product.ProductQuery.ProductUpdateAmazonEstimateFee(sqlConnectionString, list);
|
||||
bnhtrade.Core.Product.ProductQuery.ProductUpdateAmazonEstimateFee(sqlConnectionString, list);
|
||||
}
|
||||
public static void test_AmazonInventoryTableUpdate()
|
||||
{
|
||||
@@ -548,14 +557,14 @@ namespace TempStuff
|
||||
{
|
||||
DateTime entrdate = DateTime.Parse("28/11/2018 08:13:54");
|
||||
|
||||
return Core.Stock.StockCreate.WIP_StockInsertOwnerIntroduced(sqlConnectionString, 0.01m, 7, 15374, 51, 16, entrdate, 51);
|
||||
return bnhtrade.Core.Stock.StockCreate.WIP_StockInsertOwnerIntroduced(sqlConnectionString, 0.01m, 7, 15374, 51, 16, entrdate, 51);
|
||||
}
|
||||
public static int CurrencyExchangeInsert()
|
||||
{
|
||||
DateTime start = new DateTime(2019, 03, 01);
|
||||
DateTime finish = new DateTime(2019, 04, 01);
|
||||
|
||||
return Core.Account.AccountQuery.CurrencyExchangeRateInsert(sqlConnectionString, 1, "USD", 222m, start, finish, true );
|
||||
return bnhtrade.Core.Account.AccountQuery.CurrencyExchangeRateInsert(sqlConnectionString, 1, "USD", 222m, start, finish, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user