コード例 #1
0
        private int prevYearManureDefaultLookup(string prevYearManureAppl_volcatcd, string prevManureApplicationYearsFrequency)
        {
            List <PrevYearManureApplDefaultNitrogen> defaultNitrogen = new List <PrevYearManureApplDefaultNitrogen>();

            defaultNitrogen = _sd.GetPrevYearManureNitrogenCreditDefaults();
            // loop through to find the default nitrogen credit
            foreach (var item in defaultNitrogen)
            {
                if (item.prevYearManureAppFrequency == prevManureApplicationYearsFrequency)
                {
                    // refactor - check to make sure it can handle additional volCatCd
                    return(item.defaultNitrogenCredit[Convert.ToInt16(prevYearManureAppl_volcatcd)]);
                }
            }
            return(0);
        }