public static XQt0425OutBlock1[] ListFromQuery(XQt0425 query) { int count = query.GetBlockCount(XQt0425OutBlock1.BlockName); List <XQt0425OutBlock1> list = new List <XQt0425OutBlock1>(); if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { return(list.ToArray()); } for (int i = 0; i < count; i++) { XQt0425OutBlock1 block = new XQt0425OutBlock1(); block.IsValidData = true; block.InvalidReason = ""; try { block.ordno = query.GetFieldData(block.GetBlockName(), "ordno", i).ParseLong("ordno"); // long 10 block.expcode = query.GetFieldData(block.GetBlockName(), "expcode", i).TrimEnd('?'); // char 12 block.medosu = query.GetFieldData(block.GetBlockName(), "medosu", i).TrimEnd('?'); // char 10 block.qty = query.GetFieldData(block.GetBlockName(), "qty", i).ParseLong("qty"); // long 9 block.price = query.GetFieldData(block.GetBlockName(), "price", i).ParseLong("price"); // long 9 block.cheqty = query.GetFieldData(block.GetBlockName(), "cheqty", i).ParseLong("cheqty"); // long 9 block.cheprice = query.GetFieldData(block.GetBlockName(), "cheprice", i).ParseLong("cheprice"); // long 9 block.ordrem = query.GetFieldData(block.GetBlockName(), "ordrem", i).ParseLong("ordrem"); // long 9 block.cfmqty = query.GetFieldData(block.GetBlockName(), "cfmqty", i).ParseLong("cfmqty"); // long 9 block.status = query.GetFieldData(block.GetBlockName(), "status", i).TrimEnd('?'); // char 10 block.orgordno = query.GetFieldData(block.GetBlockName(), "orgordno", i).ParseLong("orgordno"); // long 10 block.ordgb = query.GetFieldData(block.GetBlockName(), "ordgb", i).TrimEnd('?'); // char 20 block.ordtime = query.GetFieldData(block.GetBlockName(), "ordtime", i).TrimEnd('?'); // char 8 block.ordermtd = query.GetFieldData(block.GetBlockName(), "ordermtd", i).TrimEnd('?'); // char 10 block.sysprocseq = query.GetFieldData(block.GetBlockName(), "sysprocseq", i).ParseLong("sysprocseq"); // long 10 block.hogagb = query.GetFieldData(block.GetBlockName(), "hogagb", i).TrimEnd('?'); // char 2 block.price1 = query.GetFieldData(block.GetBlockName(), "price1", i).ParseLong("price1"); // long 8 block.orggb = query.GetFieldData(block.GetBlockName(), "orggb", i).TrimEnd('?'); // char 2 block.singb = query.GetFieldData(block.GetBlockName(), "singb", i).TrimEnd('?'); // char 2 block.loandt = query.GetFieldData(block.GetBlockName(), "loandt", i).TrimEnd('?'); // char 8 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } list.Add(block); } return(list.ToArray()); }
public XQt0425OutBlock1[] GetBlock1s() { XQt0425OutBlock1[] instance = XQt0425OutBlock1.ListFromQuery(this); return(instance); }