public static void Collect(ExcelWorksheet rawData, UnitOfWork unit) { for (int row = 2; row <= rawData.Dimension.Rows; row++) { int oldId = rawData.ReadInteger(row, 1); PricingStatus pricingStatus = new PricingStatus { //Id = rawData.ReadInteger(row, 1) + 1, Name = rawData.ReadString(row, 2) }; unit.PricingStatuses.Insert(pricingStatus); unit.Save(); Utility.pricingStatusesDictionary.Add(oldId, pricingStatus.Id); } }
public ArrayList GetBasketItemList(PricingStatus status) { IList itemList = BasketItemList; ArrayList foundItems = new ArrayList(); foreach (IBasketLine item in itemList) { if (item.Status == status) { foundItems.Add(item); } } return foundItems; }
public int RemoveItems(PricingStatus status) { return RemoveArrayItems(GetBasketItemList(status)); }