Exemple #1
0
 protected override void OnStop()
 {
     ServiceUtility.WriteLog("eProStar Service Stoped.");
     timer.AutoReset = false;
     timer.Enabled   = false;
     ServiceConfig   = null;
 }
Exemple #2
0
        public eProStarService()
        {
            ServiceUtility.WriteLog("eProStar Service Initialized.");
            InitializeComponent();
            //ConfigurationSettingReader csr = new ConfigurationSettingReader();
            int    interval          = 1;
            string strLookUpInterval = "";

            if (ConfigurationManager.AppSettings["Interval"] != null)
            {
                strLookUpInterval = ConfigurationManager.AppSettings["Interval"].ToString().Trim();
            }
            if (strLookUpInterval.Length > 0)
            {
                try
                {
                    interval = Convert.ToInt32(strLookUpInterval);
                    interval = interval * 10000;
                }
                catch
                {
                    interval = 10000;
                }
            }
            timer          = new Timer(interval);
            timer.Enabled  = true;
            timer.Elapsed += new ElapsedEventHandler(tmrFileLookUp_Tick);
        }
Exemple #3
0
        private void ReadLoadSourceFile()
        {
            //mstrSourceFilePath = ConfigurationSettingReader.VesselFolderPath;
            if (!Directory.Exists(mstrSourceFilePath))
            {
                Directory.CreateDirectory(mstrSourceFilePath);
            }
            string[] strFiles = Directory.GetFiles(mstrSourceFilePath);
            ServiceUtility.WriteLog("Before reading Vessel upload file in ReadLoadSourceFile method", _ConfigReader.ClientCode);
            if (strFiles.Length > 0)
            {
                try
                {
                    //strCurrFileName = strFiles[0];
                    ServiceUtility.WriteLog("First Method ReadLoadSourceFile for Initial Upload :- " + strCurrFileName + Environment.NewLine + "File Process Started On " + DateTime.Now.Date.ToString("dd/MM/yyyy") + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString(), _ConfigReader.ClientCode);
                    dtSourceTble = null;

                    strBatchId = strCurrFileName.Substring(strCurrFileName.LastIndexOf(".") + 1);

                    strRemarks = "";
                    DeleteWorkingTable(strBatchId);
                    ReadFileAndLoadDataTable(strCurrFileName);
                    ServiceUtility.WriteLog("After reading Vessel upload file in ReadLoadSourceFile method", _ConfigReader.ClientCode);
                    WriteLog("File Process completed at " + DateTime.Now.Date.ToString("dd/MM/yyyy") + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString());
                }
                catch (Exception ex)
                {
                    ServiceUtility.WriteLog("Error: " + ex.Message, _ConfigReader.ClientCode);
                }
            }
            else
            {
                return;
            }
        }
Exemple #4
0
        public void beginProcess()
        {
            if (mClientCode == "HOWDEN")
            {
                try
                {
                    EventLogs.Publish("Deferred Brokerage Posting Service Started", System.Diagnostics.EventLogEntryType.Information);
                    mstrConStr = _ConfigReader.ConnString;

                    GetSheduleTime();
                    ExecuteDeferredBrokeragePosting();

                    EventLogs.Publish("Deferred Brokerage Posting Service Completed", System.Diagnostics.EventLogEntryType.Information);
                }
                catch (Exception ex)
                {
                    //Dictionary<string, object> dict = new Dictionary<string, object>();
                    //dict.Add("Date & Time   :", DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt"));
                    //dict.Add("Message       :", ex.Message);
                    //dict.Add("Stacktrace    :", ex.StackTrace);
                    //dict.Add("Exception     :", ex.ToString());
                    //LogEvent.WriteError(ex, "Error in Payment Batching - Check and Create", dict);
                    ServiceUtility.WriteLog(ex.ToString());
                }
            }
        }
Exemple #5
0
        public void PostDeferred(string strJobNumber, string ShID)
        {
            //Dictionary<string, object> dict = new Dictionary<string, object>();
            //dict.Add("Date & Time   :", DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"));
            //dict.Add("Message       :", "Deferred Posting with schedule id : " + ShID + " & Job number : " + strJobNumber);
            //LogEvent.WriteError(null, "Started - Processing Deferred Posting", dict);

            //objAdmin.SchID = ShID.ToString();
            //objAdmin.PayeeType = payeeType.ToString();
            //DeferredDS = objCLSACCommon.PushDeferredBrokToGLTran(strJobNumber, ShID);
            try
            {
                DeferredDS = GetDataSet("PushDeferredBrokToGLTran'" + ShID + "','" + strJobNumber + "','" + "" + "','" + "" + "' ");//(strJobNumber, ShID);
                if (DeferredDS != null && DeferredDS.Tables.Count > 0 && DeferredDS.Tables[0].Rows.Count > 0)
                {
                    string result = DeferredDS.Tables[0].Rows[0]["ResultDesc"].ToString();
                    ServiceUtility.WriteLog(result);
                }
            }
            catch (Exception ex)
            {
                ServiceUtility.WriteLog(ex.ToString());
            }

            //dict = new Dictionary<string, object>();
            //dict.Add("Date & Time   :", DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"));
            //dict.Add("Message       :", "Processing Batching with schedule id : " + ShID + " & Job number : " + strJobNumber);
            //LogEvent.WriteError(null, "End - Processing Payment Batching", dict);
        }
Exemple #6
0
 protected override void OnStart(string[] args)
 {
     ServiceUtility.WriteLog("eProStar Service Started.");
     LoadServiceConfig();
     ServiceUtility.WriteLog("Service Config loaded.");
     timer.AutoReset = true;
     timer.Enabled   = true;
     timer.Start();
 }
Exemple #7
0
 private void ExecuteMigrationScript()
 {
     try
     {
         DataSet ds = new DataSet();
         ds = GetDataSet("P_MigScriptBillingWoClosingSlip");
     }
     catch (Exception ex)
     {
         ServiceUtility.WriteLog(ex.ToString());
     }
 }
Exemple #8
0
 private void UpdateFileStatus(string strRefNo, string errorMessage)
 {
     try
     {
         DataSet ds = new DataSet();
         ds = GetDataSet("P_UpdateFileStatus '" + strRefNo + "'  ,  '" + errorMessage + "' ");
     }
     catch (Exception ex)
     {
         UpdateStatus();
         ServiceUtility.WriteLog(ex.ToString(), mClientCode);
     }
 }
Exemple #9
0
 public void ExecuteDeferredBrokeragePosting()
 {
     //AC_P_CheckQueueToPerformDefPosting
     //dataSet = objJobScheduleManager.CheckQueueToPerformDeferredPosting();
     dataSet = GetDataSet("AC_P_CheckQueueToPerformDefPosting");
     if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
     {
         try
         {
             PostDeferred(dataSet.Tables[0].Rows[0]["JobNumber"].ToString(), dataSet.Tables[0].Rows[0]["ScheduleId"].ToString());
         }
         catch (Exception ex)
         {
             ServiceUtility.WriteLog(ex.ToString());
         }
     }
 }
Exemple #10
0
 private void DataTransferToRealTable(string strRefNo)
 {
     try
     {
         //DataAccess dataAccessDS = null;
         DataSet ds = new DataSet();
         //object[] parameters = new object[] { strRefNo };
         //dataAccessDS = new DataAccess(_ConfigReader.ConnString,"service");
         //ds = dataAccessDS.LoadDataSet(parameters, "P_TransferVesselRealTable", "TransferVesselRealTable");
         ds = GetDataSet("P_TransferVesselRealTable '" + strRefNo + "'");
     }
     catch (Exception ex)
     {
         UpdateStatus();
         ServiceUtility.WriteLog(ex.ToString(), mClientCode);
         //refreshInputFolder();
     }
 }
Exemple #11
0
 private List <ConfigurationSettingReader> InitializeClientConfig()
 {
     ServiceUtility.WriteLog("Initializing Client Configurations.");
     ClientConfigReaders = null;
     ClientConfigReaders = new List <ConfigurationSettingReader>();
     if (ServiceConfig == null)
     {
         LoadServiceConfig();
     }
     if (ServiceConfig != null)
     {
         XmlNodeList ClientsConfig = ServiceConfig.SelectNodes("eProStarService/Client");
         foreach (XmlNode client in ClientsConfig)
         {
             ConfigurationSettingReader ConfigReader = new ConfigurationSettingReader(client);
             ClientConfigReaders.Add(ConfigReader);
         }
     }
     ServiceUtility.WriteLog("Client Configurations intialized.");
     return(ClientConfigReaders);
 }
Exemple #12
0
        public DataSet GetDataSet(string pstrSqlQuery)
        {
            DataSet       oDataSet       = new DataSet();
            SqlConnection lobjConnection = new SqlConnection(mstrConStr);

            lobjConnection.Open();
            SqlTransaction myTran    = lobjConnection.BeginTransaction("APP_DB_Tran_DS");
            SqlCommand     myCommand = new SqlCommand(pstrSqlQuery, lobjConnection);

            myCommand.Transaction    = myTran;
            myCommand.CommandTimeout = 0;
            try
            {
                SqlDataAdapter oDataAdapter = new SqlDataAdapter(myCommand);
                oDataAdapter.Fill(oDataSet, "Resultset");
                myCommand.Transaction.Commit();
                oDataAdapter.Dispose();
                oDataAdapter = null;
            }
            catch (Exception ex)
            {
                WriteLog(ex.Message);
                ServiceUtility.WriteLog(ex.ToString());
                myCommand.Transaction.Rollback();
            }
            finally
            {
                myTran.Dispose();
                myCommand.Dispose();
                if (lobjConnection != null && lobjConnection.State == ConnectionState.Open)
                {
                    lobjConnection.Close();
                }
            }
            return(oDataSet);
        }
Exemple #13
0
        public void BeginProcess()
        {
            try
            {
                DataSet ds = new DataSet();
                objclsEBMemberUpload.FromBatch = "N";

                ds = objEBMemberManager.GetBatchRawClaimUpload(objclsEBMemberUpload, _ConfigReader.ConnString);

                if (ds != null)
                {
                    // EventLogs.WriteLogInFile("Row Counts: " + ds.Tables[0].Rows.Count.ToString(), System.Diagnostics.EventLogEntryType.Information);
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        // string path = ConfigurationSettingReader.FolderPath.ToString() + "../"; //
                        // string path = ConfigurationManager.AppSettings["InitialFolderPath"].ToString().Trim();
                        strFilepath = ds.Tables[0].Rows[0]["FilePath"].ToString().Replace("~\\", "");
                        string strRefNo = ds.Tables[0].Rows[0]["RefNo"].ToString();
                        // strFilepath = path + strFilepath;

                        WriteLog("strFilepath is  " + strFilepath);
                        if (File.Exists(strFilepath))
                        {
                            WriteLog(" is  Exist - Yes");

                            if (Path.GetExtension(strFilepath).ToUpper() == ".XLS")
                            {
                                WriteLog("strFil type is XLS  ");

                                // Excel 97-2003
                                strExcelConn = _ConfigReader.ExcelConnXLS + strFilepath; // ConfigurationManager.ConnectionStrings["ExcelConnXLS"].ConnectionString + strFilepath;
                                // strExcelConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilepath + ";Extended Properties='Excel 8.0;HDR=YES;'";
                            }
                            else
                            {
                                WriteLog("strFil type is XLSX  ");

                                // Excel 2007
                                strExcelConn = _ConfigReader.ExcelConnXLSX + strFilepath;  //ConfigurationManager.ConnectionStrings["ExcelConnXLSX"].ConnectionString + strFilepath;
                                //strExcelConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strFilepath + ";Extended Properties='Excel 12.0 Xml;HDR=YES;'";
                            }

                            DataTable dtExcel = RetrieveData(strExcelConn);

                            dtExcel = RemoveEmprtyRows(dtExcel);

                            //string fileName = Path.GetFileNameWithoutExtension(strFilepath);
                            //string[] strArray = fileName.Split(new char[] { '_' }, StringSplitOptions.None);
                            //string RefNo = strArray[0];
                            if (dtExcel.Columns.Contains("RefNo") == false)
                            {
                                dtExcel.Columns.Add("RefNo");
                            }
                            for (int i = 0; i < dtExcel.Rows.Count; i++)
                            {
                                dtExcel.Rows[i]["RefNo"] = strRefNo;
                            }
                            DataAccess objDataAcces = new DataAccess(_ConfigReader.ConnString, "service");
                            WriteLog("before SP  ");
                            objDataAcces.SqlInsertDataTable("P_EB_RawDataClaim_Insert", "Type_RAWCLAIM_Item", dtExcel);
                            WriteLog("before SP  ");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WriteLog(ex.Message);
                ServiceUtility.WriteLog("Error in Raw Claim service for Client " + mClientCode + " : " + ex.Message);
            }
        }
Exemple #14
0
        protected void ReadFileAndLoadDataTable(string strFilepath)
        {
            try
            {
                intTotalNoOfRecords = 0;
                intInValidRecCnt    = 0;
                intValidRecCnt      = 0;
                intApprovalRecCnt   = 0;

                string    error   = "";
                DataTable dtExcel = new DataTable();
                error = ReadExcelFile(ref dtExcel, strFilepath);
                if (error.Trim().Length > 0)
                {
                    UpdateFileStatus(strBatchId, error);
                    //WriteLog("Unable to read excel file. Error Message:-" + Environment.NewLine + error);
                    ServiceUtility.WriteLog("Unable to read excel file. Error Message:-" + Environment.NewLine + error, mClientCode);
                    return;
                }

                if (ValidateExcel(dtExcel, 30, ref error, "Vessel", "Type", "Built", "GRT", "NRT", "BHP", "Class", "Flag", "Dimension", "Owner", "Managers", "Mortgagees", "InceptionDate", "ExpiryDate", "UnderwriterCode", "SubClassCode", "Currency", "SumInsured", "Rate", "Loading", "Share", "Premium", "Deductible", "Remarks", "DWT", "IMONo", "IVInsuredValue", "AOIInsuredValue", "AdditionalAssureds", "GeneralAverage") == false)
                {
                    UpdateFileStatus(strBatchId, error);
                    //WriteLog("Excel File format Issue:-" + Environment.NewLine + error);
                    ServiceUtility.WriteLog("Excel File format Issue:-" + Environment.NewLine + error, mClientCode);
                    return;
                }
                CreateTable();
                string   strCurrLine    = "";
                string[] strArrCurrData = null;
                int      fieldCount     = dtExcel.Columns.Count;
                foreach (DataRow dr in dtExcel.Rows)
                {
                    strCurrLine = "";
                    for (int intLnp = 0; intLnp < fieldCount; intLnp++)
                    {
                        strCurrLine += dr[intLnp] + "|";
                    }
                    strCurrLine = strCurrLine.Substring(0, strCurrLine.LastIndexOf("|"));

                    int ChkCurrLine = strCurrLine.Replace("|", "").Length;

                    strArrCurrData = strCurrLine.Replace("\r\n", " ").Split('|');
                    if (strArrCurrData != null && (strArrCurrData.Length == 30))
                    {
                        try
                        {
                            intSrNo = intSrNo + 1;
                            addInputRowToTable(strArrCurrData, strArrCurrData[0].ToString());
                        }
                        catch
                        {
                            break;
                        }
                    }
                    intTotalNoOfRecords++;
                }

                DataRow[] drInvalidRows = dtSourceTble.Select("ParseResult='INVALID'");
                DataRow[] drValidRows   = dtSourceTble.Select("ParseResult='VALID'");
                intInValidRecCnt    = drInvalidRows.Length;
                intInValidRecCnt    = (intInValidRecCnt < 0) ? 0 : intInValidRecCnt;
                intValidRecCnt      = drValidRows.Length;
                intValidRecCnt      = (intValidRecCnt < 0) ? 0 : intValidRecCnt;
                intTotalNoOfRecords = intInValidRecCnt + intValidRecCnt;

                ImportToDatabaseWorkingTblMember();
                DataTransferToRealTable(strBatchId);
                //string strBody = "Member Upload Is Successfully.<br><br>";
                //strBody = strBody + "Process Date - " + DateTime.Now.Date.ToString("dd/MM/yyyy") + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + " <br>";
                //strBody = strBody + "Fail Records - " + intInValidRecCnt.ToString() + " <br>";
                //strBody = strBody + "Success Record - " + intValidRecCnt.ToString() + " <br>";
                //strBody = strBody + "Total Records - " + intTotalNoOfRecords.ToString() + " <br>";
                //refreshInputFolder();
            }
            catch (Exception ex)
            {
                UpdateStatus();
                WriteLog(ex.ToString());
            }
            finally
            {
                refreshInputFolder();
            }
        }
Exemple #15
0
        protected void GetSheduleTime()
        {
            //string strAdhocDate = "", strAdhocHr = "", strAdhocMin = "";
            string strFrequency = "", strWeekDay = "", strHr = "", strMin = "", strMontlyDate = "", strFrequencyAdhocDate = "";

            //string strOtherDate = "", strOtherHr = "", strOtherMin = "";
            string[] strNow            = System.DateTime.Now.TimeOfDay.ToString().Split(':');
            string   strCurrentDate    = System.DateTime.Now.ToString("dd/MM/yyyy");
            string   _dayNumberOfMonth = System.DateTime.Now.Day.ToString();
            string   strCurrentDay     = System.DateTime.Now.DayOfWeek.ToString().Substring(0, 3).ToUpper();

            try
            {
                dataSet = GetDataSet("proc_AC_GetDefferedPostingSchedule'" + "" + "'");

                if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dataSet.Tables[0].Select())
                    {
                        strFrequency = dr["ScheduleFrequency"].ToString();
                        if (strFrequency.Equals("D"))
                        {
                            strHr  = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(0, 2);
                            strMin = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(2, 2);

                            if (strNow[0].Equals(strHr) && strNow[1].Equals(strMin))
                            {
                                CreateJobQueue(dr["ScheduleId"].ToString());
                                //CreateBatch(dr["SchID"].ToString(), dr["PayeeType"].ToString());
                            }
                        }
                        else if (strFrequency.Equals("W"))
                        {
                            int _dayOfWeek = Convert.ToInt32(dr["ScheduleDay"]);
                            strWeekDay = Enum.GetName(typeof(DayName), _dayOfWeek).Substring(0, 3).ToUpper();
                            //strWeekDay = dr["ScheduleDay"].ToString();
                            strHr  = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(0, 2);
                            strMin = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(2, 2);

                            if (strWeekDay.Equals(strCurrentDay.ToUpper()) && strNow[0].Equals(strHr) && strNow[1].Equals(strMin))
                            {
                                CreateJobQueue(dr["ScheduleId"].ToString());
                                //CreateBatch(dr["SchID"].ToString(), dr["PayeeType"].ToString());
                            }
                        }
                        else if (strFrequency.Equals("M"))
                        {
                            //strMontlyDate = dr["FrequencyDate"].ToString();
                            //strMontlyDate = dr["FrequencyMonthlyDate"].ToString();
                            strMontlyDate = dr["ScheduleDay"].ToString();
                            strHr         = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(0, 2);
                            strMin        = dr["ScheduleTime"].ToString().PadLeft(4, '0').Substring(2, 2);

                            if (_dayNumberOfMonth.Equals(strMontlyDate) && strNow[0].Equals(strHr) && strNow[1].Equals(strMin))
                            {
                                CreateJobQueue(dr["ScheduleId"].ToString());
                            }
                        }
                        //else if (strFrequency.Equals("A"))
                        //{
                        //    strFrequencyAdhocDate = dr["FrequencyAdhocDate"].ToString();
                        //    strHr = dr["Time"].ToString().Substring(0, 2);
                        //    strMin = dr["Time"].ToString().Substring(2, 2);

                        //    if (strCurrentDate.Equals(strFrequencyAdhocDate) && strNow[0].Equals(strHr) && strNow[1].Equals(strMin))
                        //    {
                        //        CreateJobQueue(dr["SchID"].ToString());
                        //    }
                        //}

                        //if (dr["SchAdhocDate"].ToString() != "")
                        //{
                        //    strAdhocDate = dr["SchAdhocDate"].ToString();
                        //    strAdhocHr = dr["SchAdhocTime"].ToString().Substring(0, 2);
                        //    strAdhocMin = dr["SchAdhocTime"].ToString().Substring(2, 2);

                        //    if (strCurrentDate.Equals(strAdhocDate) && strNow[0].Equals(strAdhocHr) && strNow[1].Equals(strAdhocMin))
                        //    {
                        //        CreateJobQueue(dr["SchID"].ToString());
                        //        //CreateBatch(dr["SchID"].ToString(), dr["PayeeType"].ToString());
                        //    }
                        //}

                        //if (dr["SchDateOtherDaily"].ToString() != "")
                        //{
                        //    strOtherDate = dr["SchDateOtherDaily"].ToString();
                        //    strOtherHr = dr["SchDateOtherTime"].ToString().Substring(0, 2);
                        //    strOtherMin = dr["SchDateOtherTime"].ToString().Substring(2, 2);

                        //    if (strCurrentDate.Equals(strOtherDate) && strNow[0].Equals(strOtherHr) && strNow[1].Equals(strOtherMin))
                        //    {
                        //        CreateJobQueue(dr["SchID"].ToString());
                        //        //CreateBatch(dr["SchID"].ToString(), dr["PayeeType"].ToString());
                        //    }
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                ServiceUtility.WriteLog(ex.ToString());
            }

            //dataSet = objCLSACCommon.GetDefferedPostingSchedule("");
        }
Exemple #16
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());
        }
        private void ReadAndAssignConfigValue(XmlNode ClientNode)
        {
            try
            {
                if (ClientNode != null)
                {
                    _ClientCode = ClientNode.Attributes["Code"].Value;
                    XmlNodeList KeyList = ClientNode.SelectNodes("add");
                    foreach (XmlNode key in KeyList)
                    {
                        string strkey   = key.Attributes["key"].Value;
                        string strValue = key.Attributes["value"].Value;
                        if (strkey == "ConnectionString")
                        {
                            _ConnString = strValue;
                        }

                        //else if(strkey=="  CheckDBConfig")
                        //      _CheckDBConfig = strValue;
                        else if (strkey == "Interval")
                        {
                            _Interval = strValue;
                        }
                        else if (strkey == "FolderPath")
                        {
                            _FolderPath = strValue;
                        }
                        //else if (strkey == "InitialFolderPath")
                        //    _InitialFolderPath = strValue;
                        else if (strkey == "LogFilePath")
                        {
                            _LogFilePath = strValue;
                        }
                        else if (strkey == "CSVSourceFilePath")
                        {
                            _CSVSourceFilePath = strValue;
                        }
                        else if (strkey == "InitialFilePath")
                        {
                            _InitialFolderPath = strValue;
                        }
                        else if (strkey == "EnrolledFilePath")
                        {
                            _EnrolledFolderPath = strValue;
                        }
                        else if (strkey == "MassAdjustmentFilePath")
                        {
                            _MassAdjustmentFolderPath = strValue;
                        }
                        else if (strkey == "ReClaimFolderPath")
                        {
                            _ReClaimFolderPath = strValue;
                        }
                        else if (strkey == "NonEBClaimFolderPath")
                        {
                            _NonEBClaimFolderPath = strValue;
                        }

                        else if (strkey == "VesselFolderPath")
                        {
                            _VesselFolderPath = strValue;
                        }
                        else if (strkey == "SMTPServer")
                        {
                            _SMTPServer = strValue;
                        }
                        else if (strkey == "FromEmail")
                        {
                            _FromEmail = strValue;
                        }
                        //else if(strkey=="ToEmail")
                        //    _ToEmail = strValue;
                        else if (strkey == "LogEnabled")
                        {
                            _LogEnabled = strValue;
                        }
                        //else if(strkey=="LogErrorEvents")
                        //    _LogEr = strValue;
                        //else if(strkey=="LogWarningEvents")
                        //    _Lo  = strValue;
                        //else if(strkey=="LogInformationEvents")
                        //    _Lo = strValue;
                        //else if(strkey=="LogAuditSuccessEvents")
                        //    _lo  = strValue;
                        //else if(strkey=="LogAuditFailureEvents")
                        //    _lo  = strValue;
                        //else if(strkey=="EventLogName")
                        //    _Eve  = strValue;
                        //else if(strkey=="EventLogSourceName")
                        //    _Eve  = strValue;
                        //else if(strkey=="ClientSettingsProvider.ServiceUri")
                        //    _Eve  = strValue;
                        else if (strkey == "ExcelConnXLS")
                        {
                            _ExcelConnXLS = strValue;
                        }
                        else if (strkey == "ExcelConnXLSX")
                        {
                            _ExcelConnXLSX = strValue;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ServiceUtility.WriteLog("Error while initializing configuration for client " + ClientCode + "." + ex.Message, ClientCode);
            }
            finally
            {
                ClientNode = null;
            }
        }