public Shop(string fileName) { if (!File.Exists(fileName) || new FileInfo(fileName).Length == 0) { DataAccess.WriteFile(fileName, new ProductList()); } productFileStorage = DataAccess.ReadFile(fileName); ProductBasket = new PurchaseList(); SearchResult = productFileStorage; IsSaved = true; this.fileName = fileName; }
public void Annulment() { ProductBasket = new PurchaseList(); }