Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #20 from etrinh/encoding_fix
Browse files Browse the repository at this point in the history
Fix SerialNumber and OrderNumber encoding to allow '-' char in their …
  • Loading branch information
thelsing authored Mar 11, 2021
2 parents 25c2b75 + dff7d3a commit 7eb0d54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,15 @@ private void CorrectIds()
_codeSegment.Id = string.Format("{0}_RS-{1:00}-{2:00000}", _applicationProgram.Id, _codeSegment.LoadStateMachine,
_codeSegment.Offset);

_hardware.Id = string.Format("{0}_H-{1}-{2}", _manufacturerData.RefId, _hardware.SerialNumber,
_hardware.Id = string.Format("{0}_H-{1}-{2}", _manufacturerData.RefId, _hardware.SerialNumber.Replace("-", ".2D"),
_hardware.VersionNumber);
_product.Id = string.Format("{0}_P-{1}", _hardware.Id, _product.OrderNumber);
_product.Id = string.Format("{0}_P-{1}", _hardware.Id, _product.OrderNumber.Replace("-", ".2D"));
_hardware2Program.Id = string.Format("{0}_HP-{1:X04}-{2:X02}-0000", _hardware.Id,
_applicationProgram.ApplicationNumber, _applicationProgram.ApplicationVersion);

_catalogSection.Id = string.Format("{0}_CS-{1}", _manufacturerData.RefId, _catalogSection.Number);

_catalogItem.Id = string.Format("{0}_CI-{1}-{2}", _hardware2Program.Id, _product.OrderNumber, _catalogItem.Number);
_catalogItem.Id = string.Format("{0}_CI-{1}-{2}", _hardware2Program.Id, _product.OrderNumber.Replace("-", ".2D"), _catalogItem.Number);
_catalogItem.ProductRefId = _product.Id;
_catalogItem.Hardware2ProgramRefId = _hardware2Program.Id;

Expand Down

0 comments on commit 7eb0d54

Please sign in to comment.