예제 #1
0
파일: t1310.cs 프로젝트: tdoobw/XingAPI
        public static XQt1310OutBlock FromQuery(XQt1310 query)
        {
            XQt1310OutBlock block = new XQt1310OutBlock();

            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_time = query.GetFieldData(block.GetBlockName(), "cts_time", 0).TrimEnd('?');                 // char 10
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
예제 #2
0
파일: t1310.cs 프로젝트: tdoobw/XingAPI
        public XQt1310OutBlock GetBlock()
        {
            XQt1310OutBlock instance = XQt1310OutBlock.FromQuery(this);

            return(instance);
        }