?? workbillspnform.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using CallCenter.Modules;
using CallCenter.BusinessLayer;
using CallCenter.BusinessInterfaces;
using CallCenter.BusinessInterfaces.MainForms;
using CallCenter.BusinessInterfaces.BaseForms.Models;
namespace CallCenter.BusinessInterfaces.BaseForms {
/// <summary>
/// WorkBillSPNForm 的摘要說明。
/// author:yanqingxi
/// </summary>
public class WorkBillSPNForm : System.Windows.Forms.Form {
#region fields
private System.Windows.Forms.TextBox textBox1;
private DevExpress.XtraEditors.PanelControl panel1;
private DevExpress.XtraEditors.PanelControl panel2;
private DevExpress.XtraEditors.GroupControl groupBox1;
private DevExpress.XtraEditors.GroupControl groupBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private DevExpress.XtraEditors.GroupControl groupBox3;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.ComboBox combWBState;
private System.Windows.Forms.ComboBox combWBGrade;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox cmbSPGrade;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label16;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
private int m_wid=-1;
private IList m_spList;
private bool isNeedSavedWBC=false;
private bool isNeedSavedSPN=false;
private string m_opId=string.Empty;
private string m_opName=string.Empty;
private CustomerInfo m_CustomerInfo=null;
private WorkBillInfo m_WorkBillInfo=null;
private SPServiceNoteInfo m_SPNInfo=null;
private OtherBLL m_OtherBLL=new OtherBLL();
private WorkBillBLL m_WorkBillBLL =new WorkBillBLL();
private SPServiceNoteBLL m_SPNBLL = new SPServiceNoteBLL();
private DevExpress.XtraEditors.TextEdit tbTelNo;
private DevExpress.XtraEditors.TextEdit tbCName;
private DevExpress.XtraEditors.TextEdit tbCcontact;
private DevExpress.XtraEditors.TextEdit tbCallingTime;
private DevExpress.XtraEditors.TextEdit tbCtype;
private DevExpress.XtraEditors.TextEdit tbCsex;
private DevExpress.XtraEditors.TextEdit tbCAddress;
private DevExpress.XtraEditors.MemoEdit tbWBBrief;
private DevExpress.XtraEditors.MemoEdit tbCComment;
private DevExpress.XtraEditors.TextEdit tbSPName;
private DevExpress.XtraEditors.TextEdit tbSPDate;
private DevExpress.XtraEditors.MemoEdit tbSPContent;
private DevExpress.XtraEditors.MemoEdit tbSPComment;
private DevExpress.XtraEditors.SimpleButton button1;
private DevExpress.XtraEditors.SimpleButton btnClose;
private ServiceProviderBLL m_SPBLL = new ServiceProviderBLL();
#endregion
#region properites
public IList SPList{
get{
if(m_spList==null){
m_spList= new ArrayList();
}
return m_spList;
}
set{
m_spList = value;
}
}
private int WBState{
get{
if("處理中"== this.combWBState.Text) {
return 10 ;
}
else if("已處理"== this.combWBState.Text) {
return 20;
}
else if("已辦結"== this.combWBState.Text) {
return 30;
}
else if("已歸檔"== this.combWBState.Text) {
return 40;
}
else {
return -1;
}
}
}
#endregion
#region 構造
public WorkBillSPNForm() {
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
InitializeCombCState();
InitializeCmbWBState();
InitializeCmbSPNState();
//
// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
//
}
public WorkBillSPNForm(CustomerInfo customerInfo,WorkBillInfo workBillInfo):this(){
if(workBillInfo==null){
return ;
}
this.m_CustomerInfo= customerInfo;
this.m_opId=ShareClass.Operator;
this.m_opName=ShareClass.OperatorChinese;
this.m_WorkBillInfo = workBillInfo;
this.m_wid = workBillInfo.id;
DownLoadCustomerInfo(customerInfo);
DownLoadWorkBillInfo(workBillInfo);
InitializeSPNInfo();
RoleLimit();
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing ) {
if( disposing ) {
if(components != null) {
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows 窗體設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent() {
this.textBox1 = new System.Windows.Forms.TextBox();
this.panel1 = new DevExpress.XtraEditors.PanelControl();
this.combWBState = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.groupBox1 = new DevExpress.XtraEditors.GroupControl();
this.label7 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.groupBox3 = new DevExpress.XtraEditors.GroupControl();
this.combWBGrade = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox2 = new DevExpress.XtraEditors.GroupControl();
this.cmbSPGrade = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.panel2 = new DevExpress.XtraEditors.PanelControl();
this.tbTelNo = new DevExpress.XtraEditors.TextEdit();
this.tbCName = new DevExpress.XtraEditors.TextEdit();
this.tbCcontact = new DevExpress.XtraEditors.TextEdit();
this.tbCallingTime = new DevExpress.XtraEditors.TextEdit();
this.tbCtype = new DevExpress.XtraEditors.TextEdit();
this.tbCsex = new DevExpress.XtraEditors.TextEdit();
this.tbCAddress = new DevExpress.XtraEditors.TextEdit();
this.tbWBBrief = new DevExpress.XtraEditors.MemoEdit();
this.tbCComment = new DevExpress.XtraEditors.MemoEdit();
this.tbSPName = new DevExpress.XtraEditors.TextEdit();
this.tbSPDate = new DevExpress.XtraEditors.TextEdit();
this.tbSPContent = new DevExpress.XtraEditors.MemoEdit();
this.tbSPComment = new DevExpress.XtraEditors.MemoEdit();
this.button1 = new DevExpress.XtraEditors.SimpleButton();
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.panel1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.groupBox1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.groupBox3)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.groupBox2)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panel2)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbTelNo.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCName.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCcontact.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCallingTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCtype.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCsex.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCAddress.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbWBBrief.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCComment.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbSPName.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbSPDate.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbSPContent.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbSPComment.Properties)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
//
// panel1
//
this.panel1.Controls.Add(this.tbWBBrief);
this.panel1.Controls.Add(this.combWBState);
this.panel1.Controls.Add(this.label15);
this.panel1.Controls.Add(this.groupBox1);
this.panel1.Controls.Add(this.groupBox3);
this.panel1.Controls.Add(this.label2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(448, 354);
this.panel1.TabIndex = 0;
//
// combWBState
//
this.combWBState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combWBState.Location = new System.Drawing.Point(96, 160);
this.combWBState.Name = "combWBState";
this.combWBState.Size = new System.Drawing.Size(120, 20);
this.combWBState.TabIndex = 0;
//
// label15
//
this.label15.Location = new System.Drawing.Point(24, 192);
this.label15.Name = "label15";
this.label15.TabIndex = 2;
this.label15.Text = "工單簡介";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tbCAddress);
this.groupBox1.Controls.Add(this.tbCsex);
this.groupBox1.Controls.Add(this.tbCtype);
this.groupBox1.Controls.Add(this.tbCallingTime);
this.groupBox1.Controls.Add(this.tbCcontact);
this.groupBox1.Controls.Add(this.tbCName);
this.groupBox1.Controls.Add(this.tbTelNo);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Location = new System.Drawing.Point(8, 6);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(434, 128);
this.groupBox1.TabIndex = 0;
this.groupBox1.Text = "客戶信息";
//
// label7
//
this.label7.Location = new System.Drawing.Point(224, 24);
this.label7.Name = "label7";
this.label7.TabIndex = 46;
this.label7.Text = "來電時間";
//
// label5
//
this.label5.Location = new System.Drawing.Point(16, 96);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 44;
this.label5.Text = "客戶地址";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.TabIndex = 42;
this.label1.Text = "來電號碼";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 48);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 25;
this.label3.Text = "客戶姓名";
//
// label4
//
this.label4.Location = new System.Drawing.Point(224, 72);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 27;
this.label4.Text = "客戶性別";
//
// label6
//
this.label6.Location = new System.Drawing.Point(16, 72);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(72, 23);
this.label6.TabIndex = 31;
this.label6.Text = "聯系方式";
//
// label9
//
this.label9.Location = new System.Drawing.Point(224, 48);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(72, 23);
this.label9.TabIndex = 36;
this.label9.Text = "客戶類別";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.tbCComment);
this.groupBox3.Controls.Add(this.combWBGrade);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Location = new System.Drawing.Point(8, 240);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -