Exemple #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<OutputGroupModel> listGroups = null;
            OutputGroupModel group = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listGroups = new List<OutputGroupModel>();

            // Get value
            var cbDeleteFlag = new ComboModel();
            foreach (var obj in resultObject.ListGroups)
            {
                group = new OutputGroupModel();
                group.GroupCd = DataHelper.ToString(obj.GroupCd);
                group.GroupName = DataHelper.ToString(obj.GroupName);
                group.SortKey = DataHelper.ToString(Formats.NUMBER, obj.SortKey);
                group.DeleteFlag = DataHelper.ToString(obj.DeleteFlag);
                group.UpdateDate = DataHelper.ToString(Formats.UPDATE_DATE, obj.UpdateDate);

                cbDeleteFlag = MCodeCom.ToComboItems(resultObject.ListDeleteFlag, group.DeleteFlag);
                group.ListDeleteFlag = cbDeleteFlag.ListItems;
                group.DeleteFlag = cbDeleteFlag.SeletedValue;

                listGroups.Add(group);
            }

            // Set value
            responseModel.ListGroups = listGroups;

            // Return value
            return responseModel;
        }
Exemple #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 value
            return responseModel;
        }