public bool InsertCalorieCountOffDay(int personId, DateTime datetimeEntered)
        {
            Uri uri = new Uri(this.BaseWebAPIURL + "CalorieCountOffDay");
            CalorieCountOffDay offDayModel = new CalorieCountOffDay()
            {
                PersonId = personId, DateEntered = datetimeEntered.Date
            };

            var result = HttpHelper.PostValues(uri, offDayModel);

            // always true for now
            return(true);
        }
Exemple #2
0
        public bool Insert(HUTModels.CalorieCountOffDay model)
        {
            try
            {
                CalorieCountOffDay countOffDay = new CalorieCountOffDay()
                {
                    PersonId = model.PersonId, DateEntered = model.DateEntered
                };

                repo.Create(countOffDay);
                repo.Save();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }