Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SetMeta(string.Format("{0} - {1}", SettingsMain.ShopName, Resource.Admin_CertificateAdmin_Header));

            if (string.IsNullOrEmpty(Request["certificatecode"]))
            {
                Response.Redirect("default.aspx");
            }

            try
            {
                if (!IsPostBack)
                {
                    var certificate = GiftCertificateService.GetCertificateByCode(Request["certificatecode"]);

                    if (certificate != null)
                    {
                        lblCertificateID.Text   = certificate.CertificateId.ToString();
                        lblCertificateCode.Text = certificate.CertificateCode;
                        lblOrderNumber.Text     = certificate.ApplyOrderNumber;
                        lblSum.Text             = certificate.Sum.ToString();
                        lblFrom.Text            = certificate.FromName;
                        lblTo.Text          = certificate.ToName;
                        lblUserMessage.Text = certificate.CertificateMessage;
                        lblEmail.Text       = certificate.ToEmail;
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.LogError(ex);
            }
        }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(Request["certificatecode"]))
        {
            Response.Redirect("default.aspx");
        }

        try
        {
            if (!IsPostBack)
            {
                var certificate = GiftCertificateService.GetCertificateByCode(Request["certificatecode"]);

                if (certificate != null)
                {
                    lblCertificateID.Text   = certificate.CertificateId.ToString();
                    lblCertificateCode.Text = certificate.CertificateCode;
//                   lblCertificateStatus.Text = certificate.Status.ToString();
                    lblOrderNumber.Text = certificate.OrderNumber;
                    lblSum.Text         = certificate.Sum.ToString();
                    lblFrom.Text        = certificate.FromName;
                    lblTo.Text          = certificate.ToName;
                    lblUserMessage.Text = certificate.CertificateMessage;

                    if (certificate.Type == CertificatePostType.Email)
                    {
                        pnlMail.Visible  = false;
                        pnlEmail.Visible = true;
                        lblEmail.Text    = certificate.Email;
                    }
                    else
                    {
                        pnlMail.Visible  = true;
                        pnlEmail.Visible = false;
                        lblAddress.Text  = string.Format("{0}, {1}, {2}, {3}, {4}", certificate.Country, certificate.Zone,
                                                         certificate.City, certificate.Address, certificate.Zip);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            Debug.LogError(ex);
        }
    }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Logo.ImgSource = FoldersHelper.GetPath(FolderType.Pictures, SettingsMain.LogoImageName, false);

            if (Request["certificatecode"].IsNotEmpty())
            {
                GiftCertificate certificate = GiftCertificateService.GetCertificateByCode(Request["certificatecode"]);

                if (certificate == null)
                {
                    return;
                }

                lblCertificateCode.Text = certificate.CertificateCode;
                lblToName.Text          = certificate.ToName;
                lblFromName.Text        = certificate.FromName;
                lblMessage.Text         = certificate.CertificateMessage;
                lblSum.Text             = CatalogService.GetStringPrice(certificate.Sum);
            }
            else
            {
                lblCertificateCode.Text = "0000-0000-0000";
            }
        }