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); } } } }