コード例 #1
0
        public void runStoreFullSync()
        {
            storeSyncError = 0;
            try
            {
                List <string[]> docs = rproDBHandler.getInTransitDocuments();
                if (storeSyncError > 0)
                {
                    return;
                }
                if (docs.Count > 0)
                {
                    StoreSyncConfirmationForm sscf = new StoreSyncConfirmationForm(docs);
                    sscf.ShowDialog();
                    if (!sscf.cont)
                    {
                        return;
                    }
                }

                Queue <StoreCost> storeCosts = rproDBHandler.getStoreCosts();
                msSqlDBHandler.insertStoreCost(storeCosts, rproDBHandler);
                string body = "Store sync completed with " + storeSyncError + " error(s).";

                rproDBHandler.addLog(MainController.LogType.REPORT, null, null, MainController.Features.STORE_SYNC, body, null);
            }
            catch (Exception e)
            {
                rproDBHandler.addLog(MainController.LogType.EXCEPTION, null, null, MainController.Features.STORE_SYNC, "Exception occurred when running store sync ", e);
                return;
            }
        }