| | |
| | | { |
| | | var itemForValve = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForValve.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Valve); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Valves.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |
| | |
| | | { |
| | | var itemForElbow = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForElbow.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Elbow); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Elbows.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |
| | |
| | | { |
| | | var itemForThreelink = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForThreelink.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Threelink); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Threelinks.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |
| | |
| | | { |
| | | var itemForFourlink = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForFourlink.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Fourlink); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Fourlinks.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |
| | |
| | | { |
| | | var itemForExchanger = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForExchanger.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Exchanger); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Exchangers.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |
| | |
| | | { |
| | | var itemForCompressor = new HydroLossStatisticsCatalogItemViewModel(); |
| | | itemForCompressor.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Compressor); |
| | | var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); |
| | | var codes = hydroInfo.Compressors.Select(x => x.Code).Distinct().ToList(); |
| | | var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); |
| | | if (items != null && items.Count > 0) |
| | | { |