Пример #1
0
        private void Interface_DeliveryBoard(DateTime lastupdate)
        {
            List <DeliveryBoard> lstDelivery;

            try
            {
                //eventLog1.WriteEntry("Get Stock By Delivery Board", EventLogEntryType.Information);
                //get data from oracle database
                using (QueryBLL oraQuery = new QueryBLL())
                {
                    lstDelivery = oraQuery.GetDeliveryBoard();
                }

                // Insert data to SQLite database
                if (lstDelivery != null)
                {
                    //eventLog1.WriteEntry("SQLite Stock By Delivery Board", EventLogEntryType.Information);
                    using (InterfaceBLL infBll = new InterfaceBLL())
                    {
                        infBll.InsertDeliveryBoard(lstDelivery, lastupdate);
                        infBll.DeleteDeliveryBoard();
                        infBll.UpdateDeliveryBoard();
                    }
                }
            }
            catch (Exception ex)
            {
                eventLog1.WriteEntry(ex.Message, EventLogEntryType.Error);
            }
        }