Exemplo n.º 1
0
        public static string GetPriceTier(string uscode)
        {
            var financeData = DataSync_LDW_AM_STFinanceData2.Search(f => f.UsCode == uscode)
                              .OrderByDescending(e => e.FinanceYear)
                              .ThenByDescending(e => e.FinanceMonth)
                              .FirstOrDefault();
            string returnVal = "";

            if (financeData != null)
            {
                returnVal = financeData.Price_Tier;
            }
            return(returnVal);
        }
Exemplo n.º 2
0
        public static List <string> GetYearMonths(string projectId, out string SelectedYearMonth)
        {
            var uscode          = RenewalInfo.FirstOrDefault(ci => ci.ProjectId == projectId).USCode;
            var yearMonthList   = DataSync_LDW_AM_STFinanceData2.Search(f => f.UsCode == uscode).Select(i => new { YearMonth = i.FinanceYear + "-" + i.FinanceMonth }).Distinct().OrderByDescending(i => i).Take(12).ToList().Select(i => { return(i.YearMonth); }).ToList();
            var ldw_financeData = LDW_FinanceData.Get(projectId);

            if (ldw_financeData != null)
            {
                SelectedYearMonth = ldw_financeData.FinanceYear + "-" + ldw_financeData.FinanceMonth;
            }
            else
            {
                SelectedYearMonth = yearMonthList.FirstOrDefault();
            }
            return(yearMonthList);
        }