Пример #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<OutputOfferItemModel> listOfferItems = null;
            OutputOfferItemModel offerItem = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listOfferItems = new List<OutputOfferItemModel>();

            // Get value
            var cbDeleteFlag = new ComboModel();
            foreach (var obj in resultObject.ListOfferItems)
            {
                offerItem = new OutputOfferItemModel();
                offerItem.OfferCd = DataHelper.ToString(obj.OfferCd);
                offerItem.DetailNo = DataHelper.ToString(obj.DetailNo);
                offerItem.OfferItemCd = DataHelper.ToString(obj.OfferItemCd);
                offerItem.OfferItemQtty = DataHelper.ToString(Formats.NUMBER, obj.OfferItemQtty);
                offerItem.DeleteFlag = DataHelper.ToString(obj.DeleteFlag);
                offerItem.UpdateDate = DataHelper.ToString(Formats.UPDATE_DATE, obj.UpdateDate);

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

                listOfferItems.Add(offerItem);
            }

            // Set value
            responseModel.OfferCd = resultObject.OfferCd;
            responseModel.ListOfferItems = listOfferItems;

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