public static XQCLNAQ00100OutBlock1 FromQuery(XQCLNAQ00100 query) { XQCLNAQ00100OutBlock1 block = new XQCLNAQ00100OutBlock1(); 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.QryTp = query.GetFieldData(block.GetBlockName(), "QryTp", 0).FirstOrDefault(); // char 1 block.IsuNo = query.GetFieldData(block.GetBlockName(), "IsuNo", 0).TrimEnd('?'); // char 12 block.SecTpCode = query.GetFieldData(block.GetBlockName(), "SecTpCode", 0).FirstOrDefault(); // char 1 block.LoanIntrstGrdCode = query.GetFieldData(block.GetBlockName(), "LoanIntrstGrdCode", 0).TrimEnd('?'); // char 2 block.LoanTp = query.GetFieldData(block.GetBlockName(), "LoanTp", 0).FirstOrDefault(); // char 1 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public static XQCLNAQ00100OutBlock3 FromQuery(XQCLNAQ00100 query) { XQCLNAQ00100OutBlock3 block = new XQCLNAQ00100OutBlock3(); 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.LrgMnyoutSumAmt = query.GetFieldData(block.GetBlockName(), "LrgMnyoutSumAmt", 0).ParseLong("LrgMnyoutSumAmt"); // long 16 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public static XQCLNAQ00100OutBlock2[] ListFromQuery(XQCLNAQ00100 query) { int count = query.GetBlockCount(XQCLNAQ00100OutBlock2.BlockName); List <XQCLNAQ00100OutBlock2> list = new List <XQCLNAQ00100OutBlock2>(); if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { return(list.ToArray()); } for (int i = 0; i < count; i++) { XQCLNAQ00100OutBlock2 block = new XQCLNAQ00100OutBlock2(); block.IsValidData = true; block.InvalidReason = ""; try { block.IsuNo = query.GetFieldData(block.GetBlockName(), "IsuNo", i).TrimEnd('?'); // char 12 block.IsuNm = query.GetFieldData(block.GetBlockName(), "IsuNm", i).TrimEnd('?'); // char 40 block.Parprc = query.GetFieldData(block.GetBlockName(), "Parprc", i).ParseDouble("Parprc"); // double 13.2 block.PrdayCprc = query.GetFieldData(block.GetBlockName(), "PrdayCprc", i).ParseDouble("PrdayCprc"); // double 13.2 block.RatVal = query.GetFieldData(block.GetBlockName(), "RatVal", i).ParseDouble("RatVal"); // double 19.8 block.SubstPrc = query.GetFieldData(block.GetBlockName(), "SubstPrc", i).ParseDouble("SubstPrc"); // double 13.2 block.RegTpNm = query.GetFieldData(block.GetBlockName(), "RegTpNm", i).TrimEnd('?'); // char 20 block.SpotMgnLevyClssNm = query.GetFieldData(block.GetBlockName(), "SpotMgnLevyClssNm", i).TrimEnd('?'); // char 40 block.FnoTrdStopRsnCnts = query.GetFieldData(block.GetBlockName(), "FnoTrdStopRsnCnts", i).TrimEnd('?'); // char 40 block.DgrsPtnNm = query.GetFieldData(block.GetBlockName(), "DgrsPtnNm", i).TrimEnd('?'); // char 40 block.AcdPtnNm = query.GetFieldData(block.GetBlockName(), "AcdPtnNm", i).TrimEnd('?'); // char 40 block.MktTpNm = query.GetFieldData(block.GetBlockName(), "MktTpNm", i).TrimEnd('?'); // char 20 block.LmtVal = query.GetFieldData(block.GetBlockName(), "LmtVal", i).ParseLong("LmtVal"); // long 18 block.AcntLmtVal = query.GetFieldData(block.GetBlockName(), "AcntLmtVal", i).ParseLong("AcntLmtVal"); // long 18 block.LoanGrdCode = query.GetFieldData(block.GetBlockName(), "LoanGrdCode", i).TrimEnd('?'); // char 2 block.LoanAmt = query.GetFieldData(block.GetBlockName(), "LoanAmt", i).ParseLong("LoanAmt"); // long 16 block.LoanAbleRat = query.GetFieldData(block.GetBlockName(), "LoanAbleRat", i).ParseDouble("LoanAbleRat"); // double 26.9 block.LoanIntrat1 = query.GetFieldData(block.GetBlockName(), "LoanIntrat1", i).ParseDouble("LoanIntrat1"); // double 14.4 block.RegPsnId = query.GetFieldData(block.GetBlockName(), "RegPsnId", i).TrimEnd('?'); // char 16 block.Rat01 = query.GetFieldData(block.GetBlockName(), "Rat01", i).ParseDouble("Rat01"); // double 19.8 block.Rat02 = query.GetFieldData(block.GetBlockName(), "Rat02", i).ParseDouble("Rat02"); // double 19.8 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } list.Add(block); } return(list.ToArray()); }