コード例 #1
0
        /// Function Header*******************************************************
        /// Function Name: GetFoodExchangeChartByCalories
        /// Function Type: Function
        /// Functionality: used to get the meal chart by calories.
        /// Input: 
        /// Output: 
        /// Return Value:
        /// Note: 
        /// *********************************************************************
        public Entity.UserInfo GetFoodExchangeChartByCalories(int _intCalories)
        {
            using (TLWDALDataContext _db = new TLWDALDataContext())
            {
                var _varFAQRet = (from _fChart in _db.ms_GetFoodExchangeChartByCalories(_intCalories)
                                  select new Entity.UserInfo
                                  {
                                      IntFoodExchangeChartId = _fChart.intFoodExchangeChartId,
                                      IntCalories = _fChart.intCalories,
                                      IntMilk = _fChart.intMilk,
                                      IntFruit = _fChart.intFruit,
                                      IntVegetable = _fChart.intVegetable,
                                      IntStarch = _fChart.intStarch,
                                      IntProtein = _fChart.intProtein,
                                      IntFat = _fChart.intFat,
                                      IntWater = _fChart.intWater,
                                      DtModifiedOn = _fChart.dtModifiedOn,
                                      StrModifiedBy = _fChart.strModifiedBy
                                  }
                               ).FirstOrDefault();


                return _varFAQRet;
            }
        }