Esempio n. 1
0
        public static XQCFOAQ10100OutBlock1 FromQuery(XQCFOAQ10100 query)
        {
            XQCFOAQ10100OutBlock1 block = new XQCFOAQ10100OutBlock1();

            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.QryTp            = query.GetFieldData(block.GetBlockName(), "QryTp", 0).FirstOrDefault();        // char 1
                block.OrdAmt           = query.GetFieldData(block.GetBlockName(), "OrdAmt", 0).ParseLong("OrdAmt");    // long 16
                block.RatVal           = query.GetFieldData(block.GetBlockName(), "RatVal", 0).ParseDouble("RatVal");  // double 19.8
                block.FnoIsuNo         = query.GetFieldData(block.GetBlockName(), "FnoIsuNo", 0).TrimEnd('?');         // char 12
                block.BnsTpCode        = query.GetFieldData(block.GetBlockName(), "BnsTpCode", 0).FirstOrDefault();    // char 1
                block.OrdPrc           = query.GetFieldData(block.GetBlockName(), "OrdPrc", 0).ParseDouble("OrdPrc");  // double 13.2
                block.FnoOrdprcPtnCode = query.GetFieldData(block.GetBlockName(), "FnoOrdprcPtnCode", 0).TrimEnd('?'); // char 2
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Esempio n. 2
0
        public XQCFOAQ10100OutBlock1 GetBlock1()
        {
            XQCFOAQ10100OutBlock1 instance = XQCFOAQ10100OutBlock1.FromQuery(this);

            return(instance);
        }