sb.AppendFormat(" AND {0}={1} ",nameof(RB_Destination_Extend.ID),QDistrict);
}
if(QCity>0&&QDistrict<=0)
{
sb.AppendFormat(" AND ({0}={1} OR {2}={3}) ",nameof(RB_Destination_Extend.ParentID),QCity,nameof(RB_Destination_Extend.ID),QCity);
}
if(QProvince>0&&QCity<=0&&QDistrict<=0)
{
sb.AppendFormat(" AND (({0}={1} AND {2}={3}) OR ({4}={5}) ) ",nameof(RB_Destination_Extend.ParentID),QProvince,nameof(RB_Destination_Extend.CodeLevel),(int)Common.Enum.AreaRegionEnum.CityEnum,nameof(RB_Destination_Extend.ID),QProvince);
sb.AppendFormat(" AND (({0}={1} AND {2}={3}) OR ({4}={5})) ",nameof(RB_Destination_Extend.ParentID),QCountry,nameof(RB_Destination_Extend.CodeLevel),(int)Common.Enum.AreaRegionEnum.ProvinceEnum,nameof(RB_Destination_Extend.ID),QCountry);
sb.AppendFormat(" AND FIND_IN_SET({0},{1}) AND {2}={3} ",QArea,nameof(RB_Destination_Extend.Area),nameof(RB_Destination_Extend.CodeLevel),(int)Common.Enum.AreaRegionEnum.CountryEnum);
}
}
sb.AppendFormat(" ORDER BY {0} ASC ",nameof(RB_Destination_Extend.ID));