private void PopulateGiftCertificateDetails(GiftCertificate gift) { string errorMessage; if (gift.Verify(out errorMessage)) { uxGiftDetailDiv.Visible = true; PopulateData(gift); } else { uxGiftDetailDiv.Visible = false; uxMessage.DisplayError(errorMessage); } }
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); }