Exemplo n.º 1
0
        public HUTModels.Person Get(int id)
        {
            HUTDataAccessLayerSQL.Person person = repo.GetById <HUTDataAccessLayerSQL.Person>(id);
            HUTModels.Person             model  = new HUTModels.Person()
            {
                PersonId = person.PersonId, Firstname = person.Firstname, Lastname = person.Lastname
            };

            return(model);
        }
Exemplo n.º 2
0
        public HUTModels.Person GetSummaryForDay(int id, DateTime date)
        {
            HUTModels.Person person = Get(id);

            // get child data
            SizeBLL sizeBLL = new SizeBLL();

            person.Sizes = sizeBLL.GetByDateRange(id, date, date.AddDays(1));

            WeightBLL weightBLL = new WeightBLL();

            person.Weights = weightBLL.GetByDateRange(id, date, date.AddDays(1));

            CalorieCountBLL countBLL = new CalorieCountBLL();

            person.CalorieCounts = countBLL.GetByDateRange(id, date, date.AddDays(1));

            return(person);
        }