示例#1
0
        protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
        {
            String salesOrderCode = CommonLogic.QueryStringCanBeDangerousContent("so");

            if (!ThisCustomer.OwnsThisOrder(salesOrderCode))
            {
                Response.Redirect(SE.MakeDriverLink("ordernotfound"));
            }

            if (salesOrderCode == String.Empty)
            {
                writer.Write("<p>" + String.Format(AppLogic.GetString("reorder.aspx.2", SkinID, ThisCustomer.LocaleSetting), "account.aspx") + "</p>");
            }
            String StatusMsg = String.Empty;

            if (InterpriseHelper.ReOrderToCart(salesOrderCode, ThisCustomer, base.EntityHelpers, ref StatusMsg))
            {
                Response.Redirect(String.Format("shoppingcart.aspx{0}", StatusMsg));
            }
            else
            {
                Response.Write("<p>There were some errors in trying to create the order.</p>");
                Response.Write("<p>Error: " + StatusMsg + "</p>");
                Response.Write("<p>" + String.Format(AppLogic.GetString("reorder.aspx.2", SkinID, ThisCustomer.LocaleSetting), "shoppingcart.aspx", AppLogic.GetString("AppConfig.CartPrompt", SkinID, ThisCustomer.LocaleSetting)) + "</p>");
            }
        }