private void ValidateSkuCode() { if (String.IsNullOrEmpty(SkuCode)) { return; } bool ValidSKU; if (CurrentTask.BarCodes == null) { if (CurrentTask.FormattedSKU.Replace("-", "").ToUpper() == SkuCode.ToUpper()) { ValidSKU = true; } else { ValidSKU = CurrentTask.FormattedSKU.ToUpper() == SkuCode.ToUpper() || CurrentTask.FormattedSKU.Replace("-", "").ToUpper() == SkuCode.ToUpper(); } } else { ValidSKU = CurrentTask.BarCodes.Contains(SkuCode) || CurrentTask.FormattedSKU.ToUpper() == SkuCode.ToUpper() || CurrentTask.FormattedSKU.Replace("-", "").ToUpper() == SkuCode.ToUpper(); } if (!ValidSKU) { Result result = ConnectionService.GetSKUForBarcode(SkuCode, AppSession.UserId); ValidSKU = result.Status; if (ValidSKU) { ValidSKU = (result.Message == CurrentTask.Barcode); } } if (ValidSKU) { if (!AppSession.BulkPickByQty) { ++totalQty; if (totalQty < CurrentTask.Quantity) { Quantity = totalQty; SkuCode = String.Empty; } else { if (totalQty == CurrentTask.Quantity) { Quantity = totalQty; ActionTask("0"); } } } } else { SkuCode = String.Empty; _navigationService.DisplayAlert("Task Error", "Sku code or barcode is not valid!", "Ok"); } }