public static XQCFOBQ10800OutBlock1 FromQuery(XQCFOBQ10800 query) { XQCFOBQ10800OutBlock1 block = new XQCFOBQ10800OutBlock1(); block.IsValidData = true; block.InvalidReason = ""; if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { block.IsValidData = false; block.InvalidReason = query.ReceiveMessage; return(block); } try { block.RecCnt = query.GetFieldData(block.GetBlockName(), "RecCnt", 0).ParseLong("RecCnt"); // long 5 block.PrdgrpClssCode = query.GetFieldData(block.GetBlockName(), "PrdgrpClssCode", 0).TrimEnd('?'); // char 2 block.ClssGrpCode = query.GetFieldData(block.GetBlockName(), "ClssGrpCode", 0).TrimEnd('?'); // char 3 block.BaseYear = query.GetFieldData(block.GetBlockName(), "BaseYear", 0).TrimEnd('?'); // char 4 block.FstmmTpCode = query.GetFieldData(block.GetBlockName(), "FstmmTpCode", 0).FirstOrDefault(); // char 1 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQCFOBQ10800OutBlock1 GetBlock1() { XQCFOBQ10800OutBlock1 instance = XQCFOBQ10800OutBlock1.FromQuery(this); return(instance); }