Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool            error             = false;
            int             reviewerProfileId = AlwaysConvert.ToInt(Request.QueryString["Reviewer"]);
            ReviewerProfile profile           = ReviewerProfileDataSource.Load(reviewerProfileId);

            if (profile != null)
            {
                if (!profile.EmailVerified)
                {
                    Guid code = AlwaysConvert.ToGuid(Request.QueryString["Code"]);
                    if (profile.EmailVerificationCode == code)
                    {
                        //VERIFY THIS USER
                        profile.VerifyEmail();
                    }
                    else
                    {
                        error = true;
                    }
                }
            }
            else
            {
                error = true;
            }
            SuccessText.Text    = SuccessMessage;
            SuccessText.Visible = !error;
            FailureText.Text    = FailureMessage;
            FailureText.Visible = error;
        }
Exemplo n.º 2
0
        private void ClearSessionKey()
        {
            Guid sessionKey = AlwaysConvert.ToGuid(Request.QueryString["ProviderClassId"]);

            if ((sessionKey != Guid.Empty))
            {
                Session.Remove(sessionKey.ToString());
            }
        }
Exemplo n.º 3
0
        protected string GetCustomerName(object dataItem)
        {
            CommerceBuilder.Reporting.BasketSummary summary = (CommerceBuilder.Reporting.BasketSummary)dataItem;
            Basket basket   = BasketDataSource.Load(summary.BasketId);
            User   user     = basket.User;
            string fullName = user.PrimaryAddress.FullName;

            if (!string.IsNullOrEmpty(fullName))
            {
                return(fullName);
            }
            if (!string.IsNullOrEmpty(user.Email))
            {
                return(user.Email);
            }
            if (user.UserName.StartsWith("zz_anonymous_") ||
                AlwaysConvert.ToGuid(user.UserName) != Guid.Empty)
            {
                return("Anonymous");
            }
            return(user.UserName);
        }