private void SaveToDatabase() { EntryPerson newEntry = new EntryPerson(); newEntry.Name = nameInput.Text; newEntry.Numbers = new List <int>() { Convert.ToInt32(number1.Value), Convert.ToInt32(number2.Value), Convert.ToInt32(number3.Value) }; newEntry.Sum = "5"; newEntry.Date = date.SelectionStart.Date; database.AddEntry(newEntry); }
public void AddEntry(EntryPerson person) { table.Rows.Add(person.Name, person.GetNumbers(), person.Sum, person.Date.ToString()); }