示例#1
0
        /// <summary>
        /// Saves the address.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void SaveAddress(Object sender, EventArgs e)
        {
            int     id      = AddressEditModule1.SaveChanges();
            int     a1      = 0;
            Account account = Profile.Account;

            if (!Profile.IsAnonymous && account != null)
            {
                a1 = account.Addresses.Add(AddressEditModule1.AddressInfo);
                //Profile.Save();
            }

            if (this.IsShoppingCartMode)
            {
                /*if (ClientContext.Context.Customer != null)
                 *      ClientCustomer.AddCustomerInfo(null, new AddressInfo[] { AddressViewModule1.AddressInfo }, null);*/
                //ClientContext.Context.UpdateCartShipping(AddressViewModule1.AddressInfo);
            }

            /*else
             *      AddressViewModule1.SaveChanges();*/

            if (String.IsNullOrEmpty(ReturnUrl))
            {
                Response.Redirect(ResolveUrl("~/Profile/secure/AccountAddress.aspx"));
            }
            else
            {
                Response.Redirect(ReturnUrl);
            }
        }
示例#2
0
        /// <summary>
        /// Saves the address.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void SaveAddress(Object sender, EventArgs e)
        {
            AddressEditModule1.SaveChanges();

            if (String.IsNullOrEmpty(ReturnUrl))
            {
                Response.Redirect(ResolveUrl("~/Profile/secure/AccountAddress.aspx"));
            }
            else
            {
                Response.Redirect(ReturnUrl);
            }
        }