public static XQt3102OutBlock1[] ListFromQuery(XQt3102 query) { int count = query.GetBlockCount(XQt3102OutBlock1.BlockName); List <XQt3102OutBlock1> list = new List <XQt3102OutBlock1>(); if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { return(list.ToArray()); } for (int i = 0; i < count; i++) { XQt3102OutBlock1 block = new XQt3102OutBlock1(); block.IsValidData = true; block.InvalidReason = ""; try { block.sBody = query.GetFieldData(block.GetBlockName(), "sBody", i).TrimEnd('?'); // char 100 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } list.Add(block); } return(list.ToArray()); }
public XQt3102OutBlock1[] GetBlock1s() { XQt3102OutBlock1[] instance = XQt3102OutBlock1.ListFromQuery(this); return(instance); }