public static bool CheckTrainClass(QueryLeftNewDTOData q, QueryEntity qe) { bool flag = false; if (qe.trainClass.Contains("QB")) { flag = true; } else { List<string> trainClasslist = qe.trainClass.Split("#".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList(); string trainCode = q.queryLeftNewDTO.station_train_code.Substring(0, 1).ToUpper(); trainClasslist.ForEach(t => { if (t.Contains(trainCode)) { flag = true; } }); } return flag; }
public static bool CheckTrainClass(QueryLeftNewDTOData q, QueryEntity qe) { bool flag = false; if (qe.trainClass.Contains("QB")) { flag = true; } else { List <string> trainClasslist = qe.trainClass.Split("#".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList(); string trainCode = q.queryLeftNewDTO.station_train_code.Substring(0, 1).ToUpper(); trainClasslist.ForEach(t => { if (t.Contains(trainCode)) { flag = true; } }); } return(flag); }