| | |
| | | DtLocationInfo locationinfo = new DtLocationInfo(); |
| | | if (carType == 1 || carType == 3) |
| | | { |
| | | locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault(); |
| | | locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Layer).ThenBy(x => x.Row).FirstOrDefault(); |
| | | } |
| | | else if (carType == 2) |
| | | { |
| | | locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Layer).ThenByDescending(x => x.Column).ThenBy(x => x.Row).FirstOrDefault(); |
| | | locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderByDescending(x => x.Column).ThenBy(x => x.Layer).ThenBy(x => x.Row).FirstOrDefault(); |
| | | } |
| | | //else if (carType == 3) |
| | | //{ |
| | | // locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Row).ThenBy(x => x.Layer).FirstOrDefault(); |
| | | //} |
| | | |
| | | return locationinfo; |
| | | } |
| | | |