Ejemplo n.º 1
0
 protected void WriteLog(string strLogMsg)
 {
     EventLogs.Publish(strLogMsg, System.Diagnostics.EventLogEntryType.Information);
 }
Ejemplo n.º 2
0
        private void tmrFileLookUp_Tick(object sender, ElapsedEventArgs e)
        {
            //ServiceUtility.WriteLog("Starting Processing of services at " + DateTime.Now.Ticks.ToString());
            try
            {
                this.timer.Stop();
                if (ClientConfigReaders == null)
                {
                    InitializeClientConfig();
                }
                foreach (ConfigurationSettingReader ClientConfig in ClientConfigReaders)
                {
                    try
                    {
                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process for Member service for client " + ClientConfig.ClientCode);
                            BatchProcessMember bObj = new BatchProcessMember(ClientConfig);
                            bObj.beginProcess();
                            ServiceUtility.WriteLog("Batch Process for Member service processed for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Member service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }

                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process Raw Claim service for client " + ClientConfig.ClientCode);
                            BatchProcessRawClaim objBatchProcessRawClaim = new BatchProcessRawClaim(ClientConfig);
                            objBatchProcessRawClaim.BeginProcess();
                            ServiceUtility.WriteLog("Batch Process Raw Claim service processed  for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Raw Claim service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }

                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process Reimbursement service for client " + ClientConfig.ClientCode);
                            BatchProcessReimbursementClaim objBatchProcessReimbursementClaim = new BatchProcessReimbursementClaim(ClientConfig);
                            objBatchProcessReimbursementClaim.beginProcess();
                            ServiceUtility.WriteLog("Batch Process Reimbursement Claim service processed for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Reimbursement Claim service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }

                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process Non EB Claim service for client " + ClientConfig.ClientCode);
                            BatchProcessNonEBClaim objBatchProcessNonEBClaim = new BatchProcessNonEBClaim(ClientConfig);
                            objBatchProcessNonEBClaim.beginProcess();
                            ServiceUtility.WriteLog("Batch Process Non EB Claim service processed for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Non EB Claim service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }

                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process Vessel Upload service for client " + ClientConfig.ClientCode);
                            BatchProcessVessel objVessel = new BatchProcessVessel(ClientConfig);
                            objVessel.beginProcess();
                            ServiceUtility.WriteLog("Batch Process Vessel Upload service processed for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Vessel service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }

                        try
                        {
                            ServiceUtility.WriteLog("Starting Batch Process Billing Without Closing Slip Upload service for client " + ClientConfig.ClientCode);
                            BillingWOClosingSlip objBillingWoClosingSlip = new BillingWOClosingSlip(ClientConfig);
                            objBillingWoClosingSlip.beginProcess();
                            ServiceUtility.WriteLog("Batch Process Billing Without Closing Slip Upload service processed for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Billing Without Closing Slip service for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }
                        try
                        {
                            ServiceUtility.WriteLog("Starting Deferred Brokerage Recognition Posting for client " + ClientConfig.ClientCode);
                            BatchDeferredPosting objBatchDeferredPosting = new BatchDeferredPosting(ClientConfig);
                            objBatchDeferredPosting.beginProcess();
                            ServiceUtility.WriteLog("Deferred Brokerage Recognition Posting for client " + ClientConfig.ClientCode);
                        }
                        catch (Exception ex)
                        {
                            ServiceUtility.WriteLog("Error in Deferred Brokerage Recognition Posting for client " + ClientConfig.ClientCode + ":" + ex.Message);
                        }
                    }
                    catch (Exception ex)
                    {
                        ServiceUtility.WriteLog("Error for Client " + ClientConfig.ClientCode + ":" + ex.Message);
                        EventLogs.Publish(ex.Message, System.Diagnostics.EventLogEntryType.Information);
                        this.timer.Start();
                        //EventLogs.WriteLogInFile(ex.Message, System.Diagnostics.EventLogEntryType.Information);
                    }
                }
                this.timer.Start();
            }
            catch (Exception ex)
            {
                ServiceUtility.WriteLog(ex.Message);
                EventLogs.Publish(ex.Message, System.Diagnostics.EventLogEntryType.Information);
                this.timer.Start();
            }
            //ServiceUtility.WriteLog("End of Processing of services at " + DateTime.Now.Ticks.ToString());
        }