Ejemplo n.º 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<OutputImageModel> listFiles = null;
            OutputImageModel file = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listFiles = new List<OutputImageModel>();

            // Get value
            foreach (var obj in resultObject.ListFiles)
            {
                file = new OutputImageModel();

                file.FileId = DataHelper.ToString(obj.FileId);
                file.FileName = DataHelper.ToString(obj.FileName);
                file.FileGroup = DataHelper.ToString(obj.FileGroup);
                file.FileNo = DataHelper.ToString(Formats.NUMBER, obj.FileNo);
                file.SortKey = DataHelper.ToString(Formats.NUMBER, obj.SortKey);
                listFiles.Add(file);
            }

            // Set value
            responseModel.FileId = DataHelper.ToString(resultObject.FileId);
            responseModel.FileGroup = DataHelper.ToString(resultObject.FileGroup);
            responseModel.ListFiles = listFiles;

            // Return value
            return responseModel;
        }
Ejemplo n.º 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;
        }