Beispiel #1
0
        /// <summary>
        /// Execute processing.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>ResponseModel</returns>
        private GiftResponseModel Execute(GiftRequestModel request)
        {
            // Local variable declaration
            GiftResponseModel responseModel = null;
            ClientShoppingCartDao shoppingCartDao = new ClientShoppingCartDao();

            // Variable initialize
            responseModel = new GiftResponseModel();

            GiftCard card = shoppingCartDao.getSingleGift(request.GiftCd);
            if (card != null)
            {
                responseModel.IsExit = true;
                responseModel.GiftCd = card.GiftCd;
                responseModel.Price = card.Price.Value;
            }
            else
            {
                responseModel.IsExit = false;
            }
            return responseModel;
        }
Beispiel #2
0
 /// <summary>
 /// Gift process.
 /// </summary>
 /// <param name="request">RequestModel</param>
 /// <returns>ResponseModel</returns>
 public GiftResponseModel Invoke(GiftRequestModel request)
 {
     var responseModel = Execute(request);
     return responseModel;
 }