You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.3 KiB
65 lines
1.3 KiB
3 years ago
|
using System;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
||
|
namespace Win_in.Sfs.Scp.WebApi.Asns;
|
||
3 years ago
|
|
||
|
/// <summary>
|
||
|
/// Name
|
||
|
/// 名称
|
||
|
/// </summary>
|
||
|
public class N1
|
||
|
{
|
||
3 years ago
|
/// <summary>
|
||
|
/// Entity Identifier Code
|
||
|
/// "SF" = Ship from
|
||
|
/// "ST" = Ship to
|
||
|
/// 实体标识符代码
|
||
|
/// </summary>
|
||
|
[StringLength(2, MinimumLength = 2)]
|
||
|
public string N101 { get; private set; }
|
||
|
|
||
|
public string N102 { get; } = string.Empty;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Identification Code Qualifier
|
||
|
/// "92" = IACNA assigned code.
|
||
|
/// "1" = DUNS #.
|
||
|
/// 识别码限定符
|
||
|
/// </summary>
|
||
|
[StringLength(2, MinimumLength = 1)]
|
||
|
public string N103 { get;} = "92";
|
||
|
|
||
|
/// <summary>
|
||
|
/// Identification Code
|
||
|
/// 识别码代码
|
||
|
/// </summary>
|
||
|
[StringLength(20, MinimumLength = 5)]
|
||
3 years ago
|
public string N104 { get; set; }
|
||
3 years ago
|
|
||
|
|
||
3 years ago
|
public string N105 { get;}
|
||
|
public string N106 { get;}
|
||
3 years ago
|
|
||
3 years ago
|
public N1(NameType type,string code)
|
||
|
{
|
||
|
N101 = type.ToString();
|
||
|
N104 = code;
|
||
|
}
|
||
|
|
||
|
public override string ToString()
|
||
|
{
|
||
|
return "N1"
|
||
|
+ X12Const.ElementSeparator + N101
|
||
|
+ X12Const.ElementSeparator + N102
|
||
|
+ X12Const.ElementSeparator + N103
|
||
|
+ X12Const.ElementSeparator + N104;
|
||
|
}
|
||
|
|
||
|
|
||
3 years ago
|
public enum NameType
|
||
|
{
|
||
|
SF,
|
||
|
ST
|
||
|
}
|
||
|
|
||
|
}
|