/// <summary> /// Create new Item /// </summary> private void AddNewItem() { Random r = new Random(); Item item = new Item(); item.Name = GetItemName(); item.Amount = GetItemAmount(); item.Price = GetItemPrice(); item.Id = r.Next(0, 1000); string itemInfo = "\n" + item.Id + "," + item.Name + "," + item.Amount + "," + item.Price; Service1 s = new Service1(); s.AddNewItem(itemInfo); }