private List <CustomBillingItem> GetDisplayedDataWithSingleCostSource() { var displayedBillingItems = new List <CustomBillingItem>(); for (int i = 0; i < _colDescription.Count(); i++) { var item = new CustomBillingItem { Name = _colDescription[i].Text, Currency = _billingItemCurrencyList[i].Text, PlannedTotals = _colTotalsSingleSource[i].Text }; displayedBillingItems.Add(item); } return(displayedBillingItems); }
private List <CustomBillingItem> GetDisplayedDataWithThreeCostSources() { int start = 0; var displayedBillingItems = new List <CustomBillingItem>(); for (int i = 0; i < _colDescription.Count(); i++) { var item = new CustomBillingItem { Name = _colDescription[i].Text, Currency = _billingItemCurrencyList[i].Text }; var totals = _colTotals.ToList().GetRange(start, 3); start = (i + 1) * 3; item.PlannedTotals = totals[0].Text; item.FirstPartyTotals = totals[1].Text; item.ActualTotals = totals[2].Text; displayedBillingItems.Add(item); } return(displayedBillingItems); }