private ObservableCollection <SystemTypeItem> GetSystemTypeList() { List <Tuple <string, string, string> > getSystemTypeList = new List <Tuple <string, string, string> >(); getSystemTypeList = _projectInfoBll.GetAllSystemType(); var i = getSystemTypeList.Find(x => x.Item1.Equals(HvacSystem.HvacSystemType)); { var systemTypeItem = new SystemTypeItem { SystemID = i.Item1, Name = i.Item2, Path = i.Item3 }; SelectedsystemName = systemTypeItem; SystemTypeCollection.Add(new SystemTypeItem { SystemID = i.Item1, Name = i.Item2, Path = i.Item3 }); } return(SystemTypeCollection); }
private ObservableCollection <SystemTypeItem> GetSystemTypeList() { SystemTypeCollection.Clear(); List <Tuple <string, string, string> > getSystemTypeList = new List <Tuple <string, string, string> >(); getSystemTypeList = _projectInfoBll.GetAllSystemType(); getSystemTypeList.ForEach((item) => { //"2" is HeatExchanger if (item.Item1.Equals("2")) { if (CurrentProjectRegionSupportsHeatExchanger()) { SystemTypeCollection.Add(new SystemTypeItem { SystemID = item.Item1, Name = Language.Current.GetMessage("TOTAL_HEAT_EXCHANGER"), Path = item.Item3 }); } } else if (item.Item1.Equals("1")) { SystemTypeCollection.Add(new SystemTypeItem { SystemID = item.Item1, Name = Language.Current.GetMessage("VARIABLE_REF_FLOW"), Path = item.Item3 }); } else { SystemTypeCollection.Add(new SystemTypeItem { SystemID = item.Item1, Name = Language.Current.GetMessage("CENTRAL_CONTROLLER"), Path = item.Item3 }); } }); if (SystemTypeCollection != null && SystemTypeCollection.Count > 0) { SelectedsystemName = SystemTypeCollection.FirstOrDefault(); } SystemName = SystemSetting.UserSetting.defaultSetting.FreshAirAreaName + " " + (JCHVRF.Model.Project.CurrentProject.SystemListNextGen.Count + 1); CurrentProject.SystemName = SystemName; //takes name onto the system Name Texbox return(SystemTypeCollection); }