Commit a7b4cdc3 authored by 黄奎's avatar 黄奎

页面修改

parent 40cd9be0
......@@ -50,18 +50,24 @@ namespace Edu.Module.System
//市
case 3:
provice = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault();
item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>(provice?.ParentID);
item.CountryName = country?.Name;
if (provice != null)
{
item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>((provice?.ParentID??0));
item.CountryName = country?.Name;
}
break;
//区
case 4:
city = detailsList.Where(qitem => qitem.ID == item.ParentID)?.FirstOrDefault();
item.CityName = city?.Name;
provice = destinationRepository.GetEntity<RB_Destination_ViewModel>(city?.ParentID);
item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>(provice?.ParentID);
item.CountryName = country?.Name;
if (city != null)
{
provice = destinationRepository.GetEntity<RB_Destination_ViewModel>((city?.ParentID??0));
item.ProvinceName = provice?.Name;
country = destinationRepository.GetEntity<RB_Destination_ViewModel>((provice?.ParentID??0));
item.CountryName = country?.Name;
}
break;
}
}
......
......@@ -28,9 +28,9 @@ namespace Edu.Repository.System
sb.AppendFormat(" AND {0}={1} ", nameof(RB_Destination_ViewModel.Status), (int)Common.Enum.DateStateEnum.Normal);
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() + "%");
}
}
......
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