mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Feature repricing min max (#10)
amazon settlement import/export improvements
This commit is contained in:
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Account
|
||||
{
|
||||
public class GetTaxInfo
|
||||
public class Account
|
||||
{
|
||||
public GetTaxInfo(string sqlConnectionString)
|
||||
public Account(string sqlConnectionString)
|
||||
{
|
||||
//var inst = new Data.Database.Account.GetTaxCode(sqlConnectionString);
|
||||
//inst.
|
||||
@@ -25,7 +25,7 @@ namespace bnhtrade.Core.Test
|
||||
|
||||
private void Import()
|
||||
{
|
||||
var instance = new Test.Import.AmazonSettlement(sqlConnectionString);
|
||||
var instance = new Test.Import.Import(sqlConnectionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
44
src/bnhtrade.Core/Test/Export/Export.cs
Normal file
44
src/bnhtrade.Core/Test/Export/Export.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Export
|
||||
{
|
||||
public class Export
|
||||
{
|
||||
private string sqlConnectionString;
|
||||
public Export(string sqlConnectionString)
|
||||
{
|
||||
this.sqlConnectionString = sqlConnectionString;
|
||||
|
||||
UpdateStatusInfo();
|
||||
}
|
||||
|
||||
private void SubmitAmazonInventoryLoader()
|
||||
{
|
||||
// load temp file
|
||||
var filestream = new FileStream(@"C:\Users\Bobbie\Downloads\Step666.txt", FileMode.Open);
|
||||
var memStream = new MemoryStream();
|
||||
filestream.CopyTo(memStream);
|
||||
|
||||
var logicBit = new Core.Logic.Export.AmazonSubmitFile(sqlConnectionString);
|
||||
Model.Export.AmazonFeedSubmission kkkkkkkk;
|
||||
logicBit.SubmitInventoryLoader(memStream, out kkkkkkkk);
|
||||
}
|
||||
|
||||
private void GetAmamzonFeedList()
|
||||
{
|
||||
var something = new Data.AmazonMWS.Feeds.GetFeedSubmissions();
|
||||
var somethingelse = new Data.Database.Export.ReadAmazonFeedSubmission(sqlConnectionString).GetOpenFeeds();
|
||||
List<string> idList = somethingelse.Select(x => x.FeedSubmissionId).ToList();
|
||||
}
|
||||
|
||||
private void UpdateStatusInfo()
|
||||
{
|
||||
new Core.Logic.Export.AmazonSubmitFileStatus(sqlConnectionString).UpdateStatusInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Import
|
||||
{
|
||||
public class AmazonSettlement
|
||||
public class Import
|
||||
{
|
||||
private string sqlConnectionString;
|
||||
public AmazonSettlement(string sqlConnectionString)
|
||||
public Import(string sqlConnectionString)
|
||||
{
|
||||
this.sqlConnectionString = sqlConnectionString;
|
||||
ReadSettlementFromDatabase();
|
||||
|
||||
@@ -16,19 +16,19 @@ namespace bnhtrade.Core.Test
|
||||
}
|
||||
public void SetDatabase()
|
||||
{
|
||||
var info = new Model.AmazonFBAInbound.ShipmentInfo();
|
||||
info.AmazonShipmentId = "BOBBIE2";
|
||||
var info = new Model.AmazonFba.ShipmentInfo();
|
||||
info.FbaShipmentId = "BOBBIE2";
|
||||
info.DestinationFulfillmentCenterId = "HODG";
|
||||
info.LastUpdatedUtc = DateTime.UtcNow;
|
||||
info.LastUpdated = DateTime.Now;
|
||||
info.ShipmentName = "the one";
|
||||
info.ShipmentStatus = "WORKING";
|
||||
|
||||
bool all = info.IsSetAll();
|
||||
bool allHead = info.IsSetAllHeaderInfo();
|
||||
|
||||
var itemInfoList = new List<Model.AmazonFBAInbound.ShipmentItemInfo>();
|
||||
var itemInfoList = new List<Model.AmazonFba.ShipmentItemInfo>();
|
||||
|
||||
var itemInfo01 = new Model.AmazonFBAInbound.ShipmentItemInfo();
|
||||
var itemInfo01 = new Model.AmazonFba.ShipmentItemInfo();
|
||||
itemInfo01.AmazonFNSKU = "Z0000000";
|
||||
itemInfo01.AmazonShipmentId = "BOBBIE2";
|
||||
itemInfo01.QuantityReceived = 4;
|
||||
@@ -36,7 +36,7 @@ namespace bnhtrade.Core.Test
|
||||
itemInfo01.SKUNumber = "000291-10";
|
||||
itemInfoList.Add(itemInfo01);
|
||||
|
||||
var itemInfo02 = new Model.AmazonFBAInbound.ShipmentItemInfo();
|
||||
var itemInfo02 = new Model.AmazonFba.ShipmentItemInfo();
|
||||
itemInfo02.AmazonFNSKU = "Z0000001";
|
||||
itemInfo02.AmazonShipmentId = "BOBBIE2";
|
||||
itemInfo02.QuantityReceived = 3;
|
||||
@@ -54,10 +54,10 @@ namespace bnhtrade.Core.Test
|
||||
// Console.WriteLine("Qty Received: " + item.QuantityReceived);
|
||||
//}
|
||||
|
||||
var howto = new Data.Database.FBAInbound.SetShipmentInfo(sqlConnectionString);
|
||||
var howto = new Data.Database.AmazonShipment.SetShipmentInfo(sqlConnectionString);
|
||||
howto.Excecute(info);
|
||||
|
||||
var testkkkk = new Data.Database.FBAInbound.GetShipmentPrimaryKey(sqlConnectionString);
|
||||
var testkkkk = new Data.Database.AmazonShipment.ReadShipmentPrimaryKey(sqlConnectionString);
|
||||
int pknumber = testkkkk.ByAmazonShipmentId("FBA15CJCZ12");
|
||||
Console.WriteLine("ShipmentPK: " + pknumber);
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Logic
|
||||
{
|
||||
public class Export
|
||||
public class Logic
|
||||
{
|
||||
private string sqlConnectionString;
|
||||
public Export(string sqlConnectionString)
|
||||
public Logic(string sqlConnectionString)
|
||||
{
|
||||
this.sqlConnectionString = sqlConnectionString;
|
||||
|
||||
|
||||
26
src/bnhtrade.Core/Test/Sku/Sku.cs
Normal file
26
src/bnhtrade.Core/Test/Sku/Sku.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Sku
|
||||
{
|
||||
public class Sku
|
||||
{
|
||||
private string sqlConnectionString;
|
||||
public Sku(string sqlConnectionString)
|
||||
{
|
||||
this.sqlConnectionString = sqlConnectionString;
|
||||
|
||||
// method you want to start here
|
||||
UpdateFbaPricing();
|
||||
|
||||
}
|
||||
public void UpdateFbaPricing()
|
||||
{
|
||||
var instance = new bnhtrade.Core.Logic.Sku.Price.FbaPricing(sqlConnectionString);
|
||||
instance.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user