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

📄 serviceconfirm.aspx.cs

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

    public class ServiceConfirm : AdminPage
    {
        protected ExtendedButton BtnSave;
        protected HtmlTextArea ConfirmFeedback;
        protected DatePicker DpkConfirmDate;
        protected DropDownList DropConfirmScore;
        protected HiddenField HdnItemId;
        protected Literal LtrClientName;
        protected Literal LtrConfirmCaller;
        protected Literal LtrConfirmFeedback;
        protected Literal LtrConfirmScore;
        protected Literal LtrConfirmTime;
        protected Literal LtrContacterName;
        protected Literal LtrFeedback;
        protected Literal LtrProcessor;
        protected Literal LtrRemark;
        protected Literal LtrServiceContent;
        protected Literal LtrServiceMode;
        protected Literal LtrServiceResult;
        protected Literal LtrServiceTime;
        protected Literal LtrServiceTitle;
        protected Literal LtrServiceType;
        protected Literal LtrTakeTime;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtConfirmCaller;
        protected TextBox TxtConfirmTime;
        protected RegularExpressionValidator ValeEndTime;
        protected PowerEasy.Controls.RequiredFieldValidator ValrEndTime;
        protected DateValidator Vdate;

        protected void BtnSave_Click(object sender, EventArgs e)
        {
            if (base.IsValid)
            {
                if (DataConverter.CLng(this.HdnItemId.Value) == 0)
                {
                    AdminPage.WriteErrMsg("请指定ItemID!", "");
                }
                else
                {
                    ServiceInfo serviceInfo = this.ViewState["serviceInfo"] as ServiceInfo;
                    serviceInfo.ConfirmTime = new DateTime?(DataConverter.CDate(this.DpkConfirmDate.Date.ToString("yyyy-MM-dd") + " " + this.TxtConfirmTime.Text));
                    serviceInfo.ConfirmCaller = this.TxtConfirmCaller.Text;
                    serviceInfo.ConfirmScore = DataConverter.CLng(this.DropConfirmScore.SelectedValue);
                    serviceInfo.ConfirmFeedback = this.ConfirmFeedback.Value;
                    if (Service.Update(serviceInfo))
                    {
                        BasePage.ResponseRedirect("ServiceManage.aspx");
                    }
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                int id = BasePage.RequestInt32("ItemId");
                if (id == 0)
                {
                    AdminPage.WriteErrMsg("请指定要回访的服务记录的ID!", "");
                }
                else
                {
                    ServiceInfo serviceById = Service.GetServiceById(id);
                    this.ViewState["serviceInfo"] = serviceById;
                    this.HdnItemId.Value = id.ToString();
                    this.LtrClientName.Text = serviceById.ClientName;
                    this.LtrServiceTime.Text = serviceById.ServiceTime.ToString();
                    this.LtrServiceType.Text = Service.GetFiledNameById("ServiceType", DataConverter.CLng(serviceById.ServiceType));
                    this.LtrServiceMode.Text = Service.GetFiledNameById("ServiceMode", DataConverter.CLng(serviceById.ServiceMode));
                    this.LtrServiceTitle.Text = serviceById.ServiceTitle;
                    this.LtrServiceContent.Text = serviceById.ServiceContent;
                    this.LtrServiceResult.Text = Service.GetFiledNameById("Result", serviceById.ServiceResult);
                    this.LtrTakeTime.Text = Service.GetFiledNameById("TakeTime", serviceById.TakeTime);
                    this.LtrProcessor.Text = serviceById.Processor;
                    this.LtrProcessor.Text = serviceById.Inputer;
                    this.LtrFeedback.Text = serviceById.Feedback;
                    this.LtrRemark.Text = serviceById.Remark;
                    this.DpkConfirmDate.Text = DateTime.Today.ToString("yyyy-MM-dd");
                    this.TxtConfirmTime.Text = DateTime.Now.ToLongTimeString();
                    this.TxtConfirmCaller.Text = serviceById.ConfirmCaller;
                    Choiceset.DropDownListDataBind("PE_ServiceItem", "ConfirmScore", this.DropConfirmScore);
                    this.DropConfirmScore.SelectedValue = serviceById.ConfirmScore.ToString();
                    this.ConfirmFeedback.Value = serviceById.ConfirmFeedback;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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