protected string GetInitialValueInfo(GiftCard gc) { decimal initialValue = GiftCardHelper.GetGiftCardInitialValue(gc); string result = PriceHelper.FormatPrice(initialValue, true, false); return(result); }
private void BindData() { GiftCard gc = OrderManager.GetGiftCardById(this.GiftCardId); if (gc != null) { this.lblOrder.Text = string.Format("<a href=\"OrderDetails.aspx?OrderID={0}\">{1}</a>", gc.PurchasedOrderProductVariant.OrderId, GetLocaleResourceString("Admin.GiftCardInfo.Order.View")); this.lblCustomer.Text = string.Format("<a href=\"CustomerDetails.aspx?CustomerID={0}\">{1}</a>", gc.PurchasedOrderProductVariant.Order.CustomerId, GetLocaleResourceString("Admin.GiftCardInfo.Customer.View")); this.txtInitialValue.Value = GiftCardHelper.GetGiftCardInitialValue(gc); decimal remainingAmount = GiftCardHelper.GetGiftCardRemainingAmount(gc); this.lblRemainingAmount.Text = PriceHelper.FormatPrice(remainingAmount, true, false); this.cbIsGiftCardActivated.Checked = gc.IsGiftCardActivated; this.txtCouponCode.Text = gc.GiftCardCouponCode; this.txtRecipientName.Text = gc.RecipientName; this.txtRecipientEmail.Text = gc.RecipientEmail; this.txtSenderName.Text = gc.SenderName; this.txtSenderEmail.Text = gc.SenderEmail; this.txtMessage.Text = gc.Message; if (gc.IsRecipientNotified) { lblIsRecipientNotified.Text = GetLocaleResourceString("Admin.Common.Yes"); } else { lblIsRecipientNotified.Text = GetLocaleResourceString("Admin.Common.No"); } this.lblPurchasedOn.Text = DateTimeHelper.ConvertToUserTime(gc.CreatedOn).ToString(); } else { Response.Redirect("PurchasedGiftCards.aspx"); } }