Exemplo n.º 1
0
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                _giftCard.OriginalAmount  = TxtOriginalAmount.Text.ParseToDecimal() ?? 0M;
                _giftCard.RemainingAmount = TxtRemainingAmount.Text.ParseToDecimal() ?? 0M;
                _giftCard.CurrencyId      = long.Parse(DrpCurrencies.SelectedValue);
                _giftCard.DateValidTo     = DPValidTo.DateTime != DateTime.MinValue ? DPValidTo.DateTime : DateTime.MaxValue;

                _giftCard.Save();

                ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, CommonTerms.GiftCardSaved, string.Empty);
            }
        }