| | |
| | | public class GetStation |
| | | { |
| | | /// <summary> |
| | | /// å½ååºä½åä¸è¡æ¯å¦åå¨å
¥åºå ç¨ |
| | | /// trueï¼æ¯ falseï¼å¦ |
| | | /// </summary> |
| | | /// <param name="StationCode"></param> |
| | | /// <returns></returns> |
| | | public static bool InBusyStation(string StationCode) |
| | | { |
| | | bool OK = false; |
| | | try |
| | | { |
| | | VOLContext Context = new VOLContext(); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); |
| | | var station = stationinfoRepository.Find(x => x.stationCode == StationCode).FirstOrDefault(); |
| | | OK = stationinfoRepository.Find(x => x.area == station.area && x.line == station.line && x.location_state == LocationStateEnum.InBusy.ToString()).Any(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return OK; |
| | | } |
| | | /// <summary> |
| | | /// å½ååºä½åä¸è¡æ¯å¦åå¨åºåºå ç¨ |
| | | /// trueï¼æ¯ falseï¼å¦ |
| | | /// </summary> |
| | | /// <param name="StationCode"></param> |
| | | /// <returns></returns> |
| | | public static bool OutBusyStation(string StationCode) |
| | | { |
| | | bool OK = false; |
| | | try |
| | | { |
| | | VOLContext Context = new VOLContext(); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); |
| | | var station = stationinfoRepository.Find(x => x.stationCode == StationCode).FirstOrDefault(); |
| | | OK = stationinfoRepository.Find(x => x.area == station.area && x.line == station.line && x.location_state == LocationStateEnum.OutBusy.ToString()).Any(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return OK; |
| | | } |
| | | /// <summary> |
| | | /// å½ååºä½å¤è¾¹çè´§ä½æ¯å¦é½ä¸ºç©º |
| | | /// trueï¼å¦ falseï¼æ¯ |
| | | /// </summary> |
| | | /// <param name="StationCode"></param> |
| | | /// <returns></returns> |