示例#1
0
    private void PopulateGiftCertificateDetails(GiftCertificate gift)
    {
        string errorMessage;

        if (gift.Verify(out errorMessage))
        {
            uxGiftDetailDiv.Visible = true;
            PopulateData(gift);
        }
        else
        {
            uxGiftDetailDiv.Visible = false;
            uxMessage.DisplayError(errorMessage);
        }
    }
示例#2
0
    private bool ValidateGiftCertificate()
    {
        if (uxGiftCertificateCodeText.Text != "")
        {
            GiftCertificate giftCertificate = DataAccessContext.GiftCertificateRepository.GetOne(uxGiftCertificateCodeText.Text);

            string errorMessage;
            if (!giftCertificate.Verify(out errorMessage))
            {
                uxGiftMessageTR.Visible     = true;
                uxGiftRemainValueTR.Visible = false;
                uxGiftExpireDateTR.Visible  = false;
                uxMessage.Text = errorMessage;
                return(false);
            }
        }

        return(true);
    }