string IEdition.AlternativeCode(ExportFormat format) { string code = Code; if (AlternativeCode == null || format == ExportFormat.MPSD) { return(code); } string[] codes = AlternativeCode.Split(';'); int pos = (int)format; if (pos < 0 || pos >= codes.Length) { return(code); } if (string.IsNullOrWhiteSpace(codes[pos])) { return(code); } return(codes[pos].Trim()); }
public override string ToString() { return(Text != null ? Text : AlternativeCode.ToString()); }