Commit a7b4cdc3 authored by 黄奎's avatar 黄奎

页面修改

parent 40cd9be0
...@@ -50,18 +50,24 @@ namespace Edu.Module.System ...@@ -50,18 +50,24 @@ namespace Edu.Module.System
//市 //市
case 3: case 3:
provice = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault(); provice = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault();
item.ProvinceName = provice?.Name; if (provice != null)
country = destinationRepository.GetEntity<RB_Destination_ViewModel>(provice?.ParentID); {
item.CountryName = country?.Name; item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>((provice?.ParentID??0));
item.CountryName = country?.Name;
}
break; break;
//区 //区
case 4: case 4:
city = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault(); city = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault();
item.CityName = city?.Name; item.CityName = city?.Name;
provice = destinationRepository.GetEntity<RB_Destination_ViewModel>(city?.ParentID); if (city != null)
item.ProvinceName = provice?.Name; {
country = destinationRepository.GetEntity<RB_Destination_ViewModel>(provice?.ParentID); provice = destinationRepository.GetEntity<RB_Destination_ViewModel>((city?.ParentID??0));
item.CountryName = country?.Name; item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>((provice?.ParentID??0));
item.CountryName = country?.Name;
}
break; break;
} }
} }
......
...@@ -28,9 +28,9 @@ namespace Edu.Repository.System ...@@ -28,9 +28,9 @@ namespace Edu.Repository.System
sb.AppendFormat(" AND {0}={1} ", nameof(RB_Destination_ViewModel.Status), (int)Common.Enum.DateStateEnum.Normal); sb.AppendFormat(" AND {0}={1} ", nameof(RB_Destination_ViewModel.Status), (int)Common.Enum.DateStateEnum.Normal);
if (where != null) if (where != null)
{ {
if (where.Name != null && !string.IsNullOrEmpty(where.Name.Trim())) if (!string.IsNullOrEmpty(where.Name))
{ {
sb.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Destination_ViewModel.Name)); sb.AppendFormat(" AND {0} LIKE @Name ", nameof(RB_Destination_ViewModel.Name));
parameters.Add("Name", "%" + where.Name.Trim() + "%"); parameters.Add("Name", "%" + where.Name.Trim() + "%");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment