Пример #1
0
        public static XQCEXAQ31100OutBlock1 FromQuery(XQCEXAQ31100 query)
        {
            XQCEXAQ31100OutBlock1 block = new XQCEXAQ31100OutBlock1();

            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.InptPwd       = query.GetFieldData(block.GetBlockName(), "InptPwd", 0).TrimEnd('?');           // char 8
                block.IsuCode       = query.GetFieldData(block.GetBlockName(), "IsuCode", 0).TrimEnd('?');           // char 12
                block.BalEvalTp     = query.GetFieldData(block.GetBlockName(), "BalEvalTp", 0).FirstOrDefault();     // char 1
                block.FutsPrcEvalTp = query.GetFieldData(block.GetBlockName(), "FutsPrcEvalTp", 0).FirstOrDefault(); // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Пример #2
0
        public XQCEXAQ31100OutBlock1 GetBlock1()
        {
            XQCEXAQ31100OutBlock1 instance = XQCEXAQ31100OutBlock1.FromQuery(this);

            return(instance);
        }