public static XRC01OutBlock FromQuery(XRC01 query) { XRC01OutBlock block = new XRC01OutBlock(); block.IsValidData = true; block.InvalidReason = ""; try { block.lineseq = query.GetFieldData(block.GetBlockName(), "lineseq").ParseLong("lineseq"); // long 10 block.accno = query.GetFieldData(block.GetBlockName(), "accno").TrimEnd('?'); // char 11 block.user = query.GetFieldData(block.GetBlockName(), "user").TrimEnd('?'); // char 8 block.seq = query.GetFieldData(block.GetBlockName(), "seq").ParseLong("seq"); // long 11 block.trcode = query.GetFieldData(block.GetBlockName(), "trcode").TrimEnd('?'); // char 11 block.megrpno = query.GetFieldData(block.GetBlockName(), "megrpno").TrimEnd('?'); // char 2 block.boardid = query.GetFieldData(block.GetBlockName(), "boardid").TrimEnd('?'); // char 2 block.memberno = query.GetFieldData(block.GetBlockName(), "memberno").TrimEnd('?'); // char 5 block.bpno = query.GetFieldData(block.GetBlockName(), "bpno").TrimEnd('?'); // char 5 block.ordno = query.GetFieldData(block.GetBlockName(), "ordno").TrimEnd('?'); // char 10 block.orgordno = query.GetFieldData(block.GetBlockName(), "orgordno").TrimEnd('?'); // char 10 block.expcode = query.GetFieldData(block.GetBlockName(), "expcode").TrimEnd('?'); // char 12 block.yakseq = query.GetFieldData(block.GetBlockName(), "yakseq").TrimEnd('?'); // char 11 block.cheprice = query.GetFieldData(block.GetBlockName(), "cheprice").ParseFloat("cheprice"); // float 11.2 block.chevol = query.GetFieldData(block.GetBlockName(), "chevol").ParseLong("chevol"); // long 10 block.sessionid = query.GetFieldData(block.GetBlockName(), "sessionid").TrimEnd('?'); // char 2 block.chedate = query.GetFieldData(block.GetBlockName(), "chedate").TrimEnd('?'); // char 8 block.chetime = query.GetFieldData(block.GetBlockName(), "chetime").TrimEnd('?'); // char 9 block.spdprc1 = query.GetFieldData(block.GetBlockName(), "spdprc1").ParseFloat("spdprc1"); // float 11.2 block.spdprc2 = query.GetFieldData(block.GetBlockName(), "spdprc2").ParseFloat("spdprc2"); // float 11.2 block.dosugb = query.GetFieldData(block.GetBlockName(), "dosugb").FirstOrDefault(); // char 1 block.accno1 = query.GetFieldData(block.GetBlockName(), "accno1").TrimEnd('?'); // char 12 block.sihogagb = query.GetFieldData(block.GetBlockName(), "sihogagb").TrimEnd('?'); // char 11 block.jakino = query.GetFieldData(block.GetBlockName(), "jakino").TrimEnd('?'); // char 5 block.daeyong = query.GetFieldData(block.GetBlockName(), "daeyong").TrimEnd('?'); // char 12 block.mem_filler = query.GetFieldData(block.GetBlockName(), "mem_filler").TrimEnd('?'); // char 7 block.mem_accno = query.GetFieldData(block.GetBlockName(), "mem_accno").TrimEnd('?'); // char 11 block.mem_filler1 = query.GetFieldData(block.GetBlockName(), "mem_filler1").TrimEnd('?'); // char 42 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XRC01OutBlock GetBlock() { XRC01OutBlock instance = XRC01OutBlock.FromQuery(this); return(instance); }