Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
Tổng quan: Aspose.BarCode.BarCodeRecognition Đã kết thúc bất thường: Aspose.BarCode.dll (26.1.0)
Để lấy các trường dữ liệu của khách hàng, sử dụng giao diện chung với mã hóa AustraliaPost. Người dùng cần chuẩn bị cho ứng dụng.
public interface AustraliaPostCustomerInformationDecoderParameters
Decode(string)
Phân tích các trường dữ liệu của khách hàng từ AustraliaPost‑cod.
Có thể sử dụng mã hóa NTable‑ và CTable‑ để chuyển đổi các dữ liệu khác nhau.
Dữ liệu sẽ được tổ chức như một tập hợp các giá trị trong khoảng 0, 1, 2 hoặc 3.
string Decode(string customerInformationField)Parameters
customerInformationField Parameters
Trường dữ liệu khách hàng, mã hoá các giá trị thô theo thứ tự: 0, 1, 2 hoặc 3
Parameters
Trường bảng cho dữ liệu khách hàng bị hỏng
Parameters
Ví dụ này cho thấy cách giải mã dữ liệu bằng cách sử dụng giao diện AustraliaPostCustomerInformationDecoder.
string[] N_Table = { "00", "01", "02", "10", "11", "12", "20", "21", "22", "30" };
public string Decode(string customerInformationField)
{
StringBuilder bd = new StringBuilder();
for (int i = 0; customerInformationField.Length > i; i += 2)
{
if (customerInformationField.Length >= i + 2)
{
string tmp = customerInformationField.Substring(i, 2);
for (int j = 0; N_Table.Length > j; j++)
{
if (N_Table[j].Equals(tmp))
{
bd.Append(j);
break;
}
}
}
}
return bd.ToString();
}