public void AddNewDataItem(int year, int month, int day, string brandName, int price) { CheckCacheException(); var newItem = new FormatDataItem(); newItem.SetDate(year, month, day); newItem.SetBrandName(brandName); newItem.SetPrice(price); _dataCollection.Add(newItem); }
public void AddNewDataItem(string date, string brandName, int price) { CheckCacheException(); var newItem = new FormatDataItem(); newItem.SetDate(date); newItem.SetBrandName(brandName); newItem.SetPrice(price); _dataCollection.Add(newItem); }
public FormatDataItem(FormatDataItem initialDataItem) { if (initialDataItem == null) { throw new ArgumentNullException("Initial data item for constructor is null"); } SetDate(initialDataItem.Date); SetBrandName(initialDataItem.BrandName); SetPrice(initialDataItem.Price); }