public GlobalValues.GATE_ENTRY_STATUS GetGateEntryStatus(EESData objEESData) { GlobalValues.GATE_ENTRY_STATUS gateStatus = GlobalValues.GATE_ENTRY_STATUS.NOT_READY; if (objEESDaoService == null) { objEESDaoService = new EESDaoImp(); } if (!GetVehicleDetectorStatus(objEESData)) { if (objEESDaoService.IsPSPuttingEES(objEESData.machineCode)) { gateStatus = GlobalValues.GATE_ENTRY_STATUS.FEEDING; } else if (objEESDaoService.IsLCMGettingEES(objEESData.machineCode)) { gateStatus = GlobalValues.GATE_ENTRY_STATUS.CLEARING; } else { int state = GetEESState(objEESData); if (state == (int)EES_STATUS.EES_READY_FOR_PALLET) { gateStatus = GlobalValues.GATE_ENTRY_STATUS.CLEARING; } else if (state == (int)EES_STATUS.EES_READY_FOR_ENTRY) { gateStatus = GlobalValues.GATE_ENTRY_STATUS.READY; } } } return(gateStatus); }
public void CheckGateEntryStatus(EESData objEESData) { if (objEESDaoService == null) { objEESDaoService = new EESDaoImp(); } try { if (objEESDaoService.IsEESDisabled(objEESData.machineCode)) { return; } GlobalValues.GATE_ENTRY_STATUS status = GetGateEntryStatus(objEESData); objEESDaoService.UpdateGateEntryStatus(objEESData.machineCode, (short)status); } catch (Exception errMsg) { Console.WriteLine(errMsg.Message); } finally { } }