Пример #1
0
        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);
        }
Пример #2
0
        public XQCLNAQ00100OutBlock1 GetBlock1()
        {
            XQCLNAQ00100OutBlock1 instance = XQCLNAQ00100OutBlock1.FromQuery(this);

            return(instance);
        }