public void TaskAfterGetPalletBundle(int pathID)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     objPVLDaoService.TaskAfterGetPalletBundle(pathID);
 }
 public int FindPalletStoringSlotAndPath(Model.PVLData objPVLData)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.FindPalletStoringSlotAndPath(objPVLData));
 }
 public void UpdateAfterPVLTask(Model.PVLData objPVLData)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     objPVLDaoService.UpdateAfterPVLTask(objPVLData);
 }
 public bool IsPVLDisabled(string machineName)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.IsPVLDisabled(machineName));
 }
 public bool IsPVLSwitchOff(string machineName)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.IsPVLSwitchOff(machineName));
 }
 public bool UpdateMachineBlockStatus(string machine_code, bool blockStatus)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.UpdateMachineBlockStatus(machine_code, blockStatus));
 }
 public bool IsPVLBlockedInDB(string machineName)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.IsPVLBlockedInDB(machineName));
 }
 public Model.PVLData GetPVLDetails(Model.PVLData objPVLData)
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.GetPVLDetails(objPVLData));
 }
 public List <Model.PVLData> GetPVLList()
 {
     if (objPVLDaoService == null)
     {
         objPVLDaoService = new PVLDaoImp();
     }
     return(objPVLDaoService.GetPVLList());
 }
        public bool ConfirmPVLReadyPUTByCM(string machineCode)
        {
            bool isReady = false;

            Model.PVLData objPVLData = new Model.PVLData();
            objPVLData.machineCode = machineCode;
            if (objPVLDaoService == null)
            {
                objPVLDaoService = new PVLDaoImp();
            }
            objPVLData = objPVLDaoService.GetPVLDetails(objPVLData);
            isReady    = IsPVLReadyForPUTByCM(objPVLData);
            return(isReady);
        }
        public bool CheckPVLHealthy(Model.PVLData objPVLData)
        {
            bool isHealthy = false;

            if (objPVLDaoService == null)
            {
                objPVLDaoService = new PVLDaoImp();
            }

            using (OpcOperationsService opcd = new OpcOperationsImp(OpcConnection.GetOPCServerConnection()))
            {
                if (opcd.IsMachineHealthy(objPVLData.machineChannel + "." + objPVLData.machineCode + "." + OpcTags.PVL_Auto_Ready))
                {
                    isHealthy = opcd.ReadTag <bool>(objPVLData.machineChannel, objPVLData.machineCode, OpcTags.PVL_Auto_Ready);
                    isHealthy = isHealthy && !objPVLDaoService.IsPVLDisabled(objPVLData.machineCode);
                    isHealthy = isHealthy && !objPVLDaoService.IsPVLSwitchOff(objPVLData.machineCode);
                }
            }
            return(isHealthy);
        }