username@email.com
2025-05-15 6fe02a16e55f17e45a3997171e1b2284d45af25b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using CY.Model;
using CY.BLL;
using CY.Infrastructure.Common;
using CY.Infrastructure.Query;
using CY.BLL.Sys;
 
namespace CY.WebForm.Pages.adminclient
{
    //吴辉
    //软件销售记录回访
    public partial class BackVisitNoteEdit : BasePage
    {
        Soft_SellRecordBLL bll_Soft_SellRecordBLL = null;
        Soft_ManageBLL bll_Soft_ManageBLL = null;
 
        //初始化
        public BackVisitNoteEdit()
        {
            bll_Soft_SellRecordBLL = new Soft_SellRecordBLL();
            bll_Soft_ManageBLL = new Soft_ManageBLL();
        }
 
        // 界面加载
        protected void Page_Load(object sender, EventArgs e)
        {
 
            if (!IsPostBack)
            {
                InitData();
            }
        }
 
        //数据加载
        public void InitData()
        {
            Soft_SellRecord m_Soft_SellRecord = bll_Soft_SellRecordBLL.GetModelByKeyid(Request["keyid"].ToInt32());
            if (m_Soft_SellRecord != null)
            {
                this.spanClientName.InnerText = m_Soft_SellRecord.ClientName;
                this.spanOrderNum.InnerText = m_Soft_SellRecord.OrderNum;
                this.spanSoftName.InnerText = m_Soft_SellRecord.SoftName;
                this.spanMoney.InnerText = m_Soft_SellRecord.OrderMoney + "元 =数量:" + m_Soft_SellRecord.SoftQuantity + "×单价:" + m_Soft_SellRecord.SoftUnitprice+"元";
                this.spanStatus.InnerText = (m_Soft_SellRecord.VisitStatus == 1 ? "已回访" : "未回访");
                if (m_Soft_SellRecord.VisitStatus == 1)
                {
                    this.selSoftSc.Value = m_Soft_SellRecord.VisitSoftScore;
                    this.selServerSc.Value = m_Soft_SellRecord.VisitSoftServers;
                    this.spnLastUpdateTime.InnerText = m_Soft_SellRecord.VisitTime.Value.ToString("yyyy-MM-dd HH:mm");
                    this.spnOperator.InnerText = m_Soft_SellRecord.VisitPeople;
                    this.txtAdvice.Value = m_Soft_SellRecord.VisitProposal;
                    this.txtReason.Value = m_Soft_SellRecord.VisitReason;
                }
                else
                {
                    this.selSoftSc.Value = "一般";
                    this.selServerSc.Value = "一般";
                    this.spnLastUpdateTime.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
                    this.spnOperator.InnerText = CurrentUser.ShortName;
                    this.txtAdvice.Value = "";
                    this.txtReason.Value = "";
                }
            }
        }
 
        //表单提交
        protected void btn_submit_form(object sender, EventArgs e)
        {
            try
            {
                DateTime nowTime = DateTime.Now;
                Soft_SellRecord m_Soft_SellRecord = bll_Soft_SellRecordBLL.GetModelByKeyid(Request["keyid"].ToInt32());
 
                m_Soft_SellRecord.VisitStatus = 1;
                m_Soft_SellRecord.VisitSoftScore = this.selSoftSc.Value;
                m_Soft_SellRecord.VisitSoftServers = this.selServerSc.Value;
                m_Soft_SellRecord.VisitReason = this.txtReason.Value;
                m_Soft_SellRecord.VisitProposal = this.txtAdvice.Value;
                m_Soft_SellRecord.VisitPeople = CurrentUser.ShortName;
                m_Soft_SellRecord.VisitTime = nowTime;
 
                if (bll_Soft_SellRecordBLL.UpdateModel(m_Soft_SellRecord))
                {
                    JavaScript.MessageBox("操作成功", this, false, true);
                    InitData();
                }
                else
                    JavaScript.MessageBox("操作失败", this);
 
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                JavaScript.MessageBox("操作失败", this);
            }
        }
    }
}