Beispiel #1
0
        public static XQCCEAQ01100OutBlock1 FromQuery(XQCCEAQ01100 query)
        {
            XQCCEAQ01100OutBlock1 block = new XQCCEAQ01100OutBlock1();

            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.StnlnSeqTp = query.GetFieldData(block.GetBlockName(), "StnlnSeqTp", 0).FirstOrDefault(); // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Beispiel #2
0
        public XQCCEAQ01100OutBlock1 GetBlock1()
        {
            XQCCEAQ01100OutBlock1 instance = XQCCEAQ01100OutBlock1.FromQuery(this);

            return(instance);
        }