username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
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 CY.Model;
using CY.BLL;
using CY.BLL.Sys;
using CY.Infrastructure.Common;
 
namespace CY.WebForm.Pages.webmanage
{
    //吴辉
    //印刷顾问详情
    public partial class PC_Detail : BasePage
    {
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        EC_PrintingConsultancyBLL bll_EC_PrintingConsultancyBLL = null;
 
        //初始化
        public PC_Detail()
        {
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_EC_PrintingConsultancyBLL = new EC_PrintingConsultancyBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }
 
        //绑定数据
        public void InitData()
        {
            EC_PrintingConsultancy m_EC_PrintingConsultancy = bll_EC_PrintingConsultancyBLL.SelectModelByKeyId(Request["Keyid"].ToInt32());
            if (m_EC_PrintingConsultancy != null)
            {
                this.selStatus.DataSource = bll_Sys_DictionaryBLL.GetDataByType("印刷顾问状态");
                this.selStatus.DataValueField = "Name";
                this.selStatus.DataTextField = "Name";
                this.selStatus.DataBind();
 
                this.panelConsultancy.Visible = false;
                this.panelCostControl.Visible = false;
                this.panelLoaning.Visible = false;
 
                switch (m_EC_PrintingConsultancy.PC_Type)
                {
                    case "印刷顾问":
                        this.panelConsultancy.Visible = true;
                        this.spanConsultancy_People.InnerText = m_EC_PrintingConsultancy.PC_People;
                        this.spanConsultancy_Phone.InnerText = m_EC_PrintingConsultancy.PC_Phone;
                        this.spanConsultancy_Remark.InnerText = m_EC_PrintingConsultancy.PC_Remark;
                        break;
                    case "成本控制":
                        this.panelCostControl.Visible = true;
                        this.spanCostControl_People.InnerText = m_EC_PrintingConsultancy.PC_People;
                        this.spanCostControl_Phone.InnerText = m_EC_PrintingConsultancy.PC_Phone;
                        this.spanCostControl_PayYear.InnerText = m_EC_PrintingConsultancy.PC_Content;
                        this.spanCostControl_Price.InnerText = m_EC_PrintingConsultancy.PC_Price;
                        this.spanCostControl_Hope.InnerText = m_EC_PrintingConsultancy.PC_HopeMoney;
                        this.spanCostControl_Remark.InnerText = m_EC_PrintingConsultancy.PC_Remark;
                        break;
                    case "印刷垫资":
                        this.panelLoaning.Visible = true;
                        this.spanLoaning_People.InnerText = m_EC_PrintingConsultancy.PC_People;
                        this.spanLoaning_Phone.InnerText = m_EC_PrintingConsultancy.PC_Phone;
                        this.spanLoaning_PayYear.InnerText = m_EC_PrintingConsultancy.PC_Content;
                        this.spanLoaning_Price.InnerText = m_EC_PrintingConsultancy.PC_Price;
                        this.spanLoaning_Hope.InnerText = m_EC_PrintingConsultancy.PC_HopeMoney;
                        this.spanLoaning_Remark.InnerText = m_EC_PrintingConsultancy.PC_Remark;
                        break;
                    default:
                        break;
                }
 
                this.spanOrper.InnerText = m_EC_PrintingConsultancy.Operator.ToString2();
                this.spanLastUpTime.InnerText = m_EC_PrintingConsultancy.LastUpdateTime.ToString2();
                this.selStatus.Value = m_EC_PrintingConsultancy.PC_Status;
 
            }
        }
 
        //提交事件
        protected void btn_submit_form(object sender, EventArgs e)
        {
             EC_PrintingConsultancy m_EC_PrintingConsultancy = bll_EC_PrintingConsultancyBLL.SelectModelByKeyId(Request["Keyid"].ToInt32());
             if (m_EC_PrintingConsultancy != null)
             {
                 m_EC_PrintingConsultancy.PC_Status = this.selStatus.Value;
                 m_EC_PrintingConsultancy.Operator = CurrentUser.ShortName;
                 m_EC_PrintingConsultancy.LastUpdateTime = DateTime.Now;
                 if (bll_EC_PrintingConsultancyBLL.UpdateModel(m_EC_PrintingConsultancy))
                     JavaScript.RefreshDIVOpener(this);
                 else
                     JavaScript.MessageBox("操作失败",this);
             }
        }
    }
}