protected override void OnStart(string[] args) { System.Timers.Timer timScheduledTask = new System.Timers.Timer(); timScheduledTask.Interval = 2 * 1000; timScheduledTask.Enabled = true; timScheduledTask.Elapsed += new System.Timers.ElapsedEventHandler(timScheduledTask_Elapsed); } void timScheduledTask_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { FirstTask(tblTrain, tblDestination, tblTrackCircuit_Geocode); } void FirstTask(DataTable tbl_Train, DataTable tbl_Dest, DataTable tbl_TrkGeo) { string[,] trainArray = g.GetDataArrayFromWeb(); long eTime = g.UnixTimestampFromDateTime(DateTime.Now); // Insert the array's data into Oracle table UpdateOracleTable(eTime, trainArray, tblTrackCircuit_Geocode, sTblName); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)