private void Interface_StockByMinMax(DateTime lastupdate) { List <StockByMinMax> lstStkMinMax; try { //eventLog1.WriteEntry("Get Stock By Min Max", EventLogEntryType.Information); //get data from oracle database using (QueryBLL oraQuery = new QueryBLL()) { lstStkMinMax = oraQuery.GetStockByMinMax(); } // Insert data to SQLite database if (lstStkMinMax != null) { //eventLog1.WriteEntry("SQLite Stock By MinMax", EventLogEntryType.Information); using (InterfaceBLL infBll = new InterfaceBLL()) { infBll.InsertStockByMinMax(lstStkMinMax, lastupdate); infBll.DeleteStockByMinMax(); infBll.UpdateStockByMinMax(); } } } catch (Exception ex) { eventLog1.WriteEntry(ex.Message, EventLogEntryType.Error); } }