public AllSellerData(List <ShopWithShopParameters> shops) { allSellersDatas = new List <SingleSellerData>(); foreach (ShopWithShopParameters shop in shops) { SingleSellerData newSingleSellerData = new SingleSellerData(shop.GetShopName, shop.GetSoldItems); allSellersDatas.Add(newSingleSellerData); } }
public void AddSellerData(ShopWithShopParameters shop) { if (allSellersDatas == null) { allSellersDatas = new List <SingleSellerData>(); } SingleSellerData newSingleSellerData = new SingleSellerData(shop.GetShopName, shop.GetSoldItems); allSellersDatas.Add(newSingleSellerData); }