Пример #1
0
        /// <summary>
        /// Execute convert ouput.
        /// </summary>
        /// <param name="resultObject">DataModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Convert(InitDataModel resultObject)
        {
            // Local variable declaration
            InitResponseModel responseModel = null;
            IList<OutputParamModel> listParams = null;
            OutputParamModel param = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listParams = new List<OutputParamModel>();

            // Get value
            foreach (var obj in resultObject.ListParams)
            {
                param = new OutputParamModel();

                param.ParamCd = DataHelper.ToString(obj.ParamCd);
                param.ParamName = DataHelper.ToString(obj.ParamName);
                if (obj.ParamType == Logics.PT_NUMBER)
                    param.ParamValue = DataHelper.ToString(Formats.NUMBER, obj.ParamValue);
                else if (obj.ParamType == Logics.PT_DATE)
                    param.ParamValue = DataHelper.ToString(Formats.DATE, obj.ParamValue);
                else
                    param.ParamValue = DataHelper.ToString(obj.ParamValue);
                param.ParamType = DataHelper.ToString(obj.ParamType);
                param.Notes = DataHelper.ToString(obj.Notes);
                param.UpdateDate = DataHelper.ToString(Formats.UPDATE_DATE, obj.UpdateDate);
                listParams.Add(param);
            }

            // Set value
            responseModel.ListParams = listParams;

            // Return value
            return responseModel;
        }
Пример #2
0
        /// <summary>
        /// Execute processing.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Execute(InitRequestModel request)
        {
            // Local variable declaration
            InitResponseModel responseModel = null;
            InitDataModel inputObject = null;
            InitDataModel resultObject = null;

            // Variable initialize
            responseModel = new InitResponseModel();

            // Execute convert input.
            inputObject = Convert(request);

            // Check infomation
            Check(inputObject);

            // Get infomation
            resultObject = GetInfo(inputObject);

            // Execute convert ouput.
            responseModel = Convert(resultObject);

            return responseModel;
        }