/// <summary> /// This method synchronize qrcodes from remote to local /// </summary> public void SynchronizeQrCodesFromRemoteToLocalSync(string qrCodeSyncURL) { List <QrCodeModel> qrcodes = SynchronizerExtension.FetchEntitiesFromRemoteSync <QrCodeModel>(qrCodeSyncURL); if (qrcodes.Count > 0) { qrCodeService.BulkSave(qrcodes); SendQrCodesSynchedStatus(qrcodes, qrCodeSyncURL); } }
/// <summary> /// This method will synchronize distributors from remote to local /// </summary> public void SynchronizeDistributorsFromRemoteToLocalSync(string distributorSyncURL) { List <DistributorModel> distributors = SynchronizerExtension.FetchEntitiesFromRemoteSync <DistributorModel>(distributorSyncURL); //Console.WriteLine(distributors[0].Address); if (distributors.Count > 0) { distributorService.BulkSave(distributors); SendDistributorsSynchedStatus(distributors, distributorSyncURL); } }
/// <summary> /// this method synchornize products from remote to local /// </summary> public void SynchronizeProductsFromRemoteToLocalSync(string productGetURL) { List <ProductModel> products = SynchronizerExtension.FetchEntitiesFromRemoteSync <ProductModel>(productGetURL); if (products.Count != 0) { productService.BulkSave(products); //after synchronizing from remote to local,we have to send the signal to remote that //we have synchronized the database. SendProductSynchedStatus(products, productGetURL); } }