示例#1
0
 private void ExchangeClientAck(MessageAck messageACK)
 {
     _thAckResponse.AddThreadData(new AFTEnableDisableThreadDataResponse()
     {
         MessageID = messageACK.MessageID,
         Ack = messageACK.ACK,
     });
     LogManager.WriteLog("ExchangeClientAck(AFT) | MessageID: " + messageACK.MessageID.ToString() + ", ACK Status: " + messageACK.ACK.ToString()
                              , LogManager.enumLogLevel.Info);
 }
示例#2
0
 void _exchangeClient_EMP_DATA_ACK(MessageAck messageACK)
 {
     _thAckResponse.AddThreadData(new EmployeeMasterCardThreadDataResponse()
     {
         MessageID = messageACK.MessageID,
         Ack       = messageACK.ACK,
     });
     LogManager.WriteLog("ExchangeClientAck(Employee card event) | MessageID: " +
                         messageACK.MessageID.ToString() + ", ACK Status: " + messageACK.ACK.ToString()
                         , LogManager.enumLogLevel.Info);
 }
示例#3
0
 private void ExchangeClientVoucherAck(MessageAck messageACK)
 {
     try
     {
         _thTicketExpireAckResponse.AddThreadData(new TITOThreadDataResponse()
         {
             MessageID = messageACK.MessageID,
             Ack       = messageACK.ACK,
         });
         LogManager.WriteLog("ExchangeClientVoucherAck | MessageID: " + messageACK.MessageID.ToString() + ", ACK Status: "
                             + messageACK.ACK.ToString(), LogManager.enumLogLevel.Info);
     }
     catch (Exception ex)
     {
         LogManager.WriteLog("ExchangeClientVoucherAck | Exception Occured." + ex.Message, LogManager.enumLogLevel.Info);
         ExceptionManager.Publish(ex);
     }
 }
 private void ExchangeClientAck(MessageAck messageACK)
 {
     try
     {
         _thAckResponse.AddThreadData(new EnableDisableThreadDataResponse()
         {
             MessageID = messageACK.MessageID,
             Ack       = messageACK.ACK,
         });
         LogManager.WriteLog("ExchangeClientAck | MessageID: " + messageACK.MessageID.ToString() + ", ACK Status: " + messageACK.ACK.ToString()
                             , LogManager.enumLogLevel.Info);
     }
     catch (Exception ex)
     {
         LogManager.WriteLog("ExchangeClientAck  |   Exception Occurred", LogManager.enumLogLevel.Info);
         ExceptionManager.Publish(ex);
     }
 }
        //
        public void MachineConfig()
        {
            if (nMachineThreadComplete != nMachineTotal)
            {
                LogManager.WriteLog("MachineConfig pending items to be processed.Returning to Main.", LogManager.enumLogLevel.Info);
                return;
            }

            nMachineThreadComplete = 0;

            string PROC = "|=> MachineConfig() : ";

            if (this.IsObjectInactive)
            {
                LogManager.WriteLog(PROC + "Service was instructed to stop.", LogManager.enumLogLevel.Info);
                return;
            }


            try
            {
                DataTable getMachineDetails;
                LogManager.WriteLog("Inside MachineConfig method", LogManager.enumLogLevel.Info);

                getMachineDetails = DBBuilder.GetAAMSDetails(3);


                if (getMachineDetails.Rows.Count <= 0)
                {
                    return;
                }
                else
                {
                    nMachineTotal = getMachineDetails.Rows.Count;
                }

                foreach (DataRow row in getMachineDetails.Rows)
                {
                    if (this.IsObjectInactive)
                    {
                        LogManager.WriteLog(PROC + "Service was instructed to stop.", LogManager.enumLogLevel.Info);
                        return;
                    }

                    MachineConfigThreadData threadData = new MachineConfigThreadData()
                    {
                        Installation_No           = row["BAD_Reference_ID"] != DBNull.Value ? Convert.ToInt32(row["BAD_Reference_ID"].ToString()) : 0,
                        Enable                    = false,
                        badId                     = Convert.ToInt32(row["BAD_ID"]),
                        datapakCurrentState       = 0,
                        entityType                = 3,
                        Installation_Float_Status = row["Installation_Float_Status"] != DBNull.Value ? Convert.ToInt32(row["Installation_Float_Status"]) : 0,
                        enterprisestatus          = row["BMC_Enterprise_Status"] != DBNull.Value
                                                   ? Convert.ToBoolean(row["BMC_Enterprise_Status"].ToString())
                                                   : true,
                        updateDate = Convert.ToDateTime(row["BAD_Updated_Date"])
                    };
#if DEBUG
                    if (_machineDispatcher == null)
                    {
                        LogManager.WriteLog("|==> DANGER: _machineDispatcher is null.", LogManager.enumLogLevel.Info);
                    }
#endif
                    _machineDispatcher.AddThreadData(threadData);
                }
            }
            catch (Exception Ex)
            {
                LogManager.WriteLog("MachineConfig Error " + Ex.Message, LogManager.enumLogLevel.Info);
                ExceptionManager.Publish(Ex);
            }
        }