public static XRJX0OutBlock FromQuery(XRJX0 query) { XRJX0OutBlock block = new XRJX0OutBlock(); block.IsValidData = true; block.InvalidReason = ""; try { block.upstep = query.GetFieldData(block.GetBlockName(), "upstep").TrimEnd('?'); // char 2 block.dnstep = query.GetFieldData(block.GetBlockName(), "dnstep").TrimEnd('?'); // char 2 block.uplmtprice = query.GetFieldData(block.GetBlockName(), "uplmtprice").ParseLong("uplmtprice"); // long 10 block.dnlmtprice = query.GetFieldData(block.GetBlockName(), "dnlmtprice").ParseLong("dnlmtprice"); // long 10 block.futcode = query.GetFieldData(block.GetBlockName(), "futcode").TrimEnd('?'); // char 8 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XRJX0OutBlock GetBlock() { XRJX0OutBlock instance = XRJX0OutBlock.FromQuery(this); return(instance); }