예제 #1
0
        public void Reload()
        {
            RepositoryStatNationPopup.Sync();
            A = RepositoryStatNationPopup.StatNationPopups.OrderByDescending(l => l.Qty).ToList();

            RepositoryStatPlaceArrond.Sync();
            B = RepositoryStatPlaceArrond.StatPlaceArronds.OrderByDescending(l => l.Qty).ToList();

            xNation.Items.Clear();
            xPlaceArround.Items.Clear();

            foreach (var elm in A)
            {
                xNation.Items.Add(elm.NameNation + " ... " + elm.Qty);
            }

            foreach (var elm in B)
            {
                xPlaceArround.Items.Add(elm.NamePlaceArrond + " ... " + elm.Qty);
            }

            xNation.SelectedIndex = 0;

            xPlaceArround.SelectedIndex = 0;
        }
예제 #2
0
        public static void MegaSync()
        {
            // check tables
            var syncTask = Task <bool> .Factory.StartNew(
                () =>
            {
                RepositoryActionHashBox.Sync();
                //RepositoryCheck
                RepositoryCheckTicket.Sync();
                RepositoryCheckTicketTmp.Sync();
                RepositoryPro.Sync();
                RepositoryClientInfo.Sync();
                RepositoryCloseTicket.Sync();
                RepositoryCloseTicketCheckDiscount.Sync();
                RepositoryCloseTicketG.Sync();
                RepositoryCloseTicketTmp.Sync();
                RepositoryCountry.Sync();
                RepositoryCurrency.Sync();
                //RepositoryCurrencyRelations
                RepositoryDevisId.Sync();
                RepositoryDevisWeb.Sync();
                //RepositoryDiscount
                RepositoryDiscountCard.Sync();
                RepositoryEstablishment.Sync();
                RepositoryGeneral.Sync();
                RepositoryGroupProduct.Sync();
                //RepositoryHistoryChangeProduct
                RepositoryInfoClientsDiscountsType.Sync();
                RepositoryLastUpdate.Sync();
                RepositoryOpenTicketWindow.Sync();
                RepositoryPayProduct.Sync();
                RepositoryPayProductTmp.Sync();
                //RepositoryPriceGros
                RepositoryProduct.Sync();
                RepositoryProductBc.Sync();
                RepositoryStatNation.Sync();
                RepositoryStatNationPopup.Sync();
                RepositoryStatPlaceArrond.Sync();
                //RepositoryStockLogs
                RepositoryStockReal.Sync();
                RepositorySyncPlus.Sync();
                RepositorySyncPlusProduct.Sync();
                //RepositoryTes
                RepositoryTva.Sync();
                RepositoryTypePay.Sync();
                //RepositoryXmlFile
                return(true);
            });

            syncTask.ContinueWith(
                s => { });
        }