Exemplo n.º 1
0
        public void ExchangeAft(object _aftAsset)
        {
            try
            {
                Transport.AftAssets aftAsset         = _aftAsset as Transport.AftAssets;
                AftAssets           aftEnableDisable = new AftAssets();
                //
                MachineManagerInterface machineManagerInterface = new MachineManagerInterface();
                int nRet = 0;
                nRet = machineManagerInterface.EnableDisableAFT(aftAsset.InstallationNo, aftAsset.IsChecked);
                if (nRet == 0)
                {
                    aftAsset.Status = aftAsset.IsChecked;
                    aftEnableDisable.UpdateAftStatus(aftAsset.InstallationNo, aftAsset.IsChecked);
                }

                aftAsset.Message = nRet == 0 ? "Success" : nRet == -1 ? "Timed Out" : nRet == -2 ? "NACK" : "UnKnown Error";
            }
            catch (Exception ex)
            {
                LogManager.WriteLog("ExchangeAft: " + ex.Message, LogManager.enumLogLevel.Info);
                ExceptionManager.Publish(ex);
            }
            finally
            {
            }
        }