Exemplo n.º 1
0
        public ChildGrowthCalculator_Result ChildGrowthGradeNames(ChildGrade _grade)
        {
            try
            {
                using (var db = new DBEntities())
                {
                    var Data = db.ChildGrowthCalculator(Convert.ToDouble(_grade.Weight), Convert.ToDouble(_grade.Height),
                                                        Convert.ToDateTime(DateTime.ParseExact(_grade.DOB, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture)),
                                                        _grade.Gender, _grade.BeneType).FirstOrDefault();

                    return(Data);
                }
            }
            catch (Exception)
            {
                return(null);

                throw;
            }
        }