internal void AssignValueToAddPalletAsync(string _batchId, IList <BarcodeModel> barcodes) { try { if (barcodes.Count == 0) { PalletCollection.Clear(); Kegs = default; } else if (!PalletCollection.Any(x => x.BatchId == _batchId)) { PalletCollection.Add(new PalletModel() { Barcode = barcodes, Count = barcodes.Count(), BatchId = _batchId }); CountKegs(); } else { PalletCollection.Where(x => x.BatchId == _batchId).FirstOrDefault().Barcode = barcodes; PalletCollection.Where(x => x.BatchId == _batchId).FirstOrDefault().Count = barcodes.Count; CountKegs(); } } catch (Exception ex) { Crashes.TrackError(ex); } }
private void Cleanup() { try { PalletCollection.Clear(); AddPalletToFillScanMsg msg = new AddPalletToFillScanMsg { CleanUp = true }; MessagingCenter.Send(msg, "AddPalletToFillScanMsg"); } catch (Exception ex) { Crashes.TrackError(ex); } }
private void DeleteManifest(string manifestId) { try { var RealmDb = Realm.GetInstance(RealmDbManager.GetRealmDbConfig()); var manifest = RealmDb.All <ManifestModel>().First(b => b.ManifestId == manifestId); using (var trans = RealmDb.BeginWrite()) { RealmDb.Remove(manifest); trans.Commit(); } } catch (Exception ex) { Crashes.TrackError(ex); } ConstantManager.Barcodes?.Clear(); PalletCollection?.Clear(); }
public void Cleanup() { try { PalletCollection.Clear(); Kegs = default; ConstantManager.Barcodes.Clear(); ConstantManager.Tags.Clear(); ConstantManager.Partner = null; AddPalletToFillScanMsg msg = new AddPalletToFillScanMsg { CleanUp = true }; MessagingCenter.Send(msg, "AddPalletToFillScanMsg"); } catch (Exception ex) { Crashes.TrackError(ex); } }