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

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.cts_shcode = query.GetFieldData(block.GetBlockName(), "cts_shcode", 0).TrimEnd('?');                 // char 6
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Пример #2
0
        public XQt1410OutBlock GetBlock()
        {
            XQt1410OutBlock instance = XQt1410OutBlock.FromQuery(this);

            return(instance);
        }