Example #1
0
 public void SetCurrentItem(int id = -1)
 {
     if (id == -1)
     {
         currentItem = new TriathlonTraining();
     }
     else
     {
         currentItem = DBService.GetTriathlonTrainingById(id);
     }
 }
Example #2
0
        public void SaveTrinathlonTraining(TriathlonTraining item)
        {
            Dictionary <string, object> fields = new Dictionary <string, object>();

            fields.Add("Date", item.Date);
            fields.Add("Distance", item.Distance);
            fields.Add("Time", item.Time);
            fields.Add("Type", item.Type);
            fields.Add("Id", item.Id);
            fields.Add("UserId", item.UserId);

            Insert("TriathlonTraining", fields);
        }