GTB: - Docu; CUST: - FwUpdateBuilder: - mapping of NA corrected

This commit is contained in:
Thomas Wiedebusch 2024-05-30 14:27:58 +02:00
parent c2e76eb59b
commit 6d91ad17a8
2 changed files with 6 additions and 4 deletions

View File

@ -612,9 +612,11 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
else
{
// format is orderNumber-position e.g. 12345678-10
var orderText = cbxCordonelProductionOrdersSearch.SelectedItem.ToString().Split('-');
if (Int64.TryParse(orderText[0], out var orderNumber) &&
Int64.TryParse(orderText[1], out var orderPosition))
var orderText = cbxCordonelProductionOrdersSearch.SelectedItem.ToString();
orderText = Regex.Replace(orderText, @"[^0-9\-]", "");
var orderTexts = orderText.Split('-');
if (Int64.TryParse(orderTexts[0], out var orderNumber) &&
Int64.TryParse(orderTexts[1], out var orderPosition))
{
foreach (var order in _fwUpdateDbAccess.DbCordonelCustomerOrders.Where(order =>
order.CustomerOrderNumber == orderNumber &&
@ -4788,7 +4790,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
}
}
cordonel.Region = string.IsNullOrEmpty(cordonel.RadioFrequency) ? "NA" : "EMEA";
cordonel.Region = string.IsNullOrEmpty(cordonel.RadioFrequency) || cordonel.RadioFrequency == "0" ? "NA" : "EMEA";
_cordonelProductionSearchInfos.Add(cordonel);
}
}