public static XQt1631OutBlock FromQuery(XQt1631 query) { XQt1631OutBlock block = new XQt1631OutBlock(); block.IsValidData = true; block.InvalidReason = ""; if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { block.IsValidData = false; block.InvalidReason = query.ReceiveMessage; return(block); } try { block.cdhrem = query.GetFieldData(block.GetBlockName(), "cdhrem", 0).ParseLong("cdhrem"); // long 8 block.bdhrem = query.GetFieldData(block.GetBlockName(), "bdhrem", 0).ParseLong("bdhrem"); // long 8 block.tcdrem = query.GetFieldData(block.GetBlockName(), "tcdrem", 0).ParseLong("tcdrem"); // long 8 block.tbdrem = query.GetFieldData(block.GetBlockName(), "tbdrem", 0).ParseLong("tbdrem"); // long 8 block.cshrem = query.GetFieldData(block.GetBlockName(), "cshrem", 0).ParseLong("cshrem"); // long 8 block.bshrem = query.GetFieldData(block.GetBlockName(), "bshrem", 0).ParseLong("bshrem"); // long 8 block.tcsrem = query.GetFieldData(block.GetBlockName(), "tcsrem", 0).ParseLong("tcsrem"); // long 8 block.tbsrem = query.GetFieldData(block.GetBlockName(), "tbsrem", 0).ParseLong("tbsrem"); // long 8 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQt1631OutBlock GetBlock() { XQt1631OutBlock instance = XQt1631OutBlock.FromQuery(this); return(instance); }