| | |
| | | _CatlogID = ID; |
| | | _bll = new Yw.BLL.SysPropMapping(); |
| | | var PropTreeList = await _bll.GetHaveListByCatalogID(ID); |
| | | foreach (var item in PropTreeList) |
| | | if (PropTreeList != null) |
| | | { |
| | | repositoryItemCheckedComboBoxEdit1.Items.Clear(); |
| | | var parent = new SysPropMappingViewModel(); |
| | | parent.ID = item.ID; |
| | | parent.IsGroup = true; |
| | | parent.Name = item.Name; |
| | | _allBindingList.Add(parent); |
| | | if (item.PropList.Count > 0) |
| | | foreach (var item in PropTreeList) |
| | | { |
| | | foreach (var child in item.PropList) |
| | | repositoryItemCheckedComboBoxEdit1.Items.Clear(); |
| | | var parent = new SysPropMappingViewModel(); |
| | | parent.ID = item.ID; |
| | | parent.IsGroup = true; |
| | | parent.Name = item.Name; |
| | | _allBindingList.Add(parent); |
| | | if (item.PropList.Count > 0) |
| | | { |
| | | var model = new SysPropMappingViewModel(); |
| | | model.GroupName = item.Name; |
| | | model.ID = child.ID; |
| | | model.ParentID = item.ID; |
| | | model.Name = child.Name; |
| | | model.IsHave = child.Have; |
| | | model.IsNull = child.IsNull; |
| | | model.DefaultValue = child.DefaultValue; |
| | | model.UnitName = child.UnitName; |
| | | model.Inherit = child.Inherit; |
| | | model.ChoiceList = child.ChoiceList; |
| | | model.ChoiceIds = child.ChoiceList.Where(x => x.Have).Select(x => x.ID).ToList(); |
| | | var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.Name.ToString()).ToList(); |
| | | string result = string.Join(", ", stringList); |
| | | model.DisplayChoice = result; |
| | | _allBindingList.Add(model); |
| | | foreach (var child in item.PropList) |
| | | { |
| | | var model = new SysPropMappingViewModel(); |
| | | model.GroupName = item.Name; |
| | | model.ID = child.ID; |
| | | model.ParentID = item.ID; |
| | | model.Name = child.Name; |
| | | model.IsHave = child.Have; |
| | | model.IsNull = child.IsNull; |
| | | model.DefaultValue = child.DefaultValue; |
| | | model.UnitName = child.UnitName; |
| | | model.Inherit = child.Inherit; |
| | | model.ChoiceList = child.ChoiceList; |
| | | model.ChoiceIds = child.ChoiceList.Where(x => x.Have).Select(x => x.ID).ToList(); |
| | | var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.Name.ToString()).ToList(); |
| | | string result = string.Join(", ", stringList); |
| | | model.DisplayChoice = result; |
| | | _allBindingList.Add(model); |
| | | } |
| | | } |
| | | } |
| | | } |