public static XQFOCCQ33700OutBlock1 FromQuery(XQFOCCQ33700 query) { XQFOCCQ33700OutBlock1 block = new XQFOCCQ33700OutBlock1(); 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.AcntNo = query.GetFieldData(block.GetBlockName(), "AcntNo", 0).TrimEnd('?'); // char 20 block.Pwd = query.GetFieldData(block.GetBlockName(), "Pwd", 0).TrimEnd('?'); // char 8 block.QrySrtDt = query.GetFieldData(block.GetBlockName(), "QrySrtDt", 0).TrimEnd('?'); // char 8 block.QryEndDt = query.GetFieldData(block.GetBlockName(), "QryEndDt", 0).TrimEnd('?'); // char 8 block.QryTp = query.GetFieldData(block.GetBlockName(), "QryTp", 0).FirstOrDefault(); // char 1 block.BaseAmtTp = query.GetFieldData(block.GetBlockName(), "BaseAmtTp", 0).FirstOrDefault(); // char 1 block.QryTermTp = query.GetFieldData(block.GetBlockName(), "QryTermTp", 0).FirstOrDefault(); // char 1 block.PnlCalcTpCode = query.GetFieldData(block.GetBlockName(), "PnlCalcTpCode", 0).FirstOrDefault(); // char 1 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQFOCCQ33700OutBlock1 GetBlock1() { XQFOCCQ33700OutBlock1 instance = XQFOCCQ33700OutBlock1.FromQuery(this); return(instance); }