コード例 #1
0
        public object GetGiftCertificateByClaimCode(string claimCode)
        {
            IGiftCertificateService giftCertificateService = new GiftCertificateService(new GiftCertificateRepository());

            GiftCertificate giftCertificate = null;
            var             message         = string.Empty;
            var             isSucess        = false;

            try
            {
                giftCertificate = giftCertificateService.GetGiftCertificatebyClaimCode(claimCode);
                isSucess        = true;
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }

            return(new { Data = giftCertificate, Message = message, IsSuccess = isSucess });
        }