예제 #1
0
        public static XQCEXAQ21100OutBlock2 FromQuery(XQCEXAQ21100 query)
        {
            XQCEXAQ21100OutBlock2 block = new XQCEXAQ21100OutBlock2();

            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.AcntNm  = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                // char 40
                block.OrdQty  = query.GetFieldData(block.GetBlockName(), "OrdQty", 0).ParseLong("OrdQty");         // long 16
                block.ExecQty = query.GetFieldData(block.GetBlockName(), "ExecQty", 0).ParseLong("ExecQty");       // long 16
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
예제 #2
0
        public XQCEXAQ21100OutBlock2 GetBlock2()
        {
            XQCEXAQ21100OutBlock2 instance = XQCEXAQ21100OutBlock2.FromQuery(this);

            return(instance);
        }