예제 #1
0
        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);
        }
예제 #2
0
 public void AddEntry(EntryPerson person)
 {
     table.Rows.Add(person.Name, person.GetNumbers(), person.Sum, person.Date.ToString());
 }