/// <summary> /// See if any of the item numbers in the CSV don't exist in JDE /// </summary> /// <returns>List of part numbers that don't exist in JDE</returns> public List <string> CheckForMissingItemNumbers() { List <string> AllItemNumbers = new List <string>(); foreach (DataRow r in DT.Rows) { AllItemNumbers.Add(r.Field <string>("PART NUMBER").Trim()); } List <string> missing = JDE.GetMissingItems(AllItemNumbers.Distinct().ToList(), BranchPlant); return(missing); }
public void ItemsInBranch_All() { string branch = "1A"; List <string> itemList = new List <string>(); itemList.Add("1010"); itemList.Add("11007"); itemList.Add("11000"); List <string> returned = JDE.GetMissingItems(itemList, branch); Assert.IsTrue(0 == returned.Count); }
public void ItemsInBranch_Good() { string branch = "1A"; List <string> itemList = new List <string>(); itemList.Add("1010"); itemList.Add("11007"); itemList.Add("11000"); itemList.Add("10175"); List <string> expected = new List <string>(); expected.Add("10175"); List <string> returned = JDE.GetMissingItems(itemList, branch); Assert.IsTrue(returned.Contains("10175") && 1 == returned.Count); }