⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderfeedbackmodify.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Shop
{
    using PowerEasy.Components;
    using PowerEasy.Controls;
    using PowerEasy.Model.Shop;
    using PowerEasy.Shop;
    using PowerEasy.Web.UI;
    using System;
    using System.Web.UI.WebControls;

    public class OrderFeedbackModify : AdminPage
    {
        protected Button BtnCancel;
        protected Button BtnSubmit;
        protected HiddenField HdnOrderId;
        protected Label LblContent;
        protected Label LblUserName;
        protected Label LbtnWriteTime;
        protected Literal LtrTitle;
        private string m_Action;
        private int m_FeedbackId;
        protected PlaceHolder PlhReply;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtContent;
        protected TextBox TxtReply;

        protected void BtnCancel_Click(object sender, EventArgs e)
        {
            BasePage.ResponseRedirect("OrderManage.aspx?OrderID=" + this.HdnOrderId.Value);
        }

        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            OrderFeedbackInfo orderFeedbackInfo = this.ViewState["OrderFeedbackInfo"] as OrderFeedbackInfo;
            string action = this.m_Action;
            if (action != null)
            {
                if (!(action == "ModifyReply"))
                {
                    if (action == "ReplyContent")
                    {
                        orderFeedbackInfo.ReplyContent = this.TxtReply.Text;
                        orderFeedbackInfo.ReplyName = PEContext.Current.Admin.AdminName;
                        orderFeedbackInfo.ReplyTime = DateTime.Now;
                        goto Label_0093;
                    }
                }
                else
                {
                    orderFeedbackInfo.ReplyContent = this.TxtReply.Text;
                    goto Label_0093;
                }
            }
            orderFeedbackInfo.Content = this.TxtContent.Text;
        Label_0093:
            if (OrderFeedback.Update(orderFeedbackInfo))
            {
                if (this.m_Action == "ReplyContent")
                {
                    AdminPage.WriteSuccessMsg("回复信息成功!", "OrderManage.aspx?OrderID=" + this.HdnOrderId.Value);
                    return;
                }
                AdminPage.WriteSuccessMsg("修改反馈信息成功!", "OrderManage.aspx?OrderID=" + this.HdnOrderId.Value);
            }
            else if (this.m_Action == "ReplyContent")
            {
                AdminPage.WriteErrMsg("<li>回复信息失败!</li>");
            }
            else
            {
                AdminPage.WriteErrMsg("<li>修改反馈信息失败!</li>");
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.m_FeedbackId = BasePage.RequestInt32("ID");
            this.m_Action = BasePage.RequestString("Action");
            if (!this.Page.IsPostBack)
            {
                OrderFeedbackInfo orderFeedbackById = OrderFeedback.GetOrderFeedbackById(this.m_FeedbackId, true);
                if (orderFeedbackById.IsNull)
                {
                    AdminPage.WriteErrMsg("<li>未找到对应的订单反馈信息</li>");
                }
                else
                {
                    this.LblUserName.Text = orderFeedbackById.UserName;
                    this.LbtnWriteTime.Text = orderFeedbackById.WriteTime.ToString();
                    this.TxtContent.Text = orderFeedbackById.Content;
                    this.HdnOrderId.Value = orderFeedbackById.OrderId.ToString();
                    string action = this.m_Action;
                    if (action != null)
                    {
                        if (!(action == "ModifyReply"))
                        {
                            if (action == "ReplyContent")
                            {
                                this.TxtContent.Visible = false;
                                this.PlhReply.Visible = true;
                                this.LblContent.Visible = true;
                                this.LblContent.Text = orderFeedbackById.Content;
                                this.LtrTitle.Text = "回复订单反馈";
                            }
                        }
                        else
                        {
                            this.TxtContent.Visible = false;
                            this.PlhReply.Visible = true;
                            this.LblContent.Visible = true;
                            this.LblContent.Text = orderFeedbackById.Content;
                            this.TxtReply.Text = orderFeedbackById.ReplyContent;
                            this.LtrTitle.Text = "修改回复信息";
                        }
                    }
                    this.ViewState["OrderFeedbackInfo"] = orderFeedbackById;
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -