?? wbcreatucontrol.cs
字號:
using System;
using System.Data;
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>
/// WBCreatUControl 生成工單窗口。
/// author:yanqinxi
/// </summary>
public class WBCreatUControl : System.Windows.Forms.UserControl {
#region fields
private DevExpress.XtraEditors.PanelControl panel_WBList;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbTCType;
private System.Windows.Forms.ComboBox cmbOPType;
private DevExpress.XtraEditors.PanelControl panel_TWBList;
private Crownwood.Magic.Controls.TabControl tabControl2;
private Crownwood.Magic.Controls.TabPage tabP_CreatWB;
private Crownwood.Magic.Controls.TabPage tabP_WBList;
private IList m_WBList; //用戶工單列表
private IList m_TWBList; //員工當天工單列表
private DialogResult m_dlg;
private bool canSaved = false;
private bool isNeddRefreshWBLV = false;
private bool isNeddRefreshTWBLV = false;
private string m_opId = string.Empty;
private string m_opName = string.Empty;
private int[] WBLV_DisplayCol = {2,3,6,7,10,13};
private int[] TWBLV_DisplayCol = {2,3,6,7,10,13};
private TelCallingControl tcc=null;
private ListViewHelper m_WBListView;
private WorkBillInfo m_workBillInf=null;
private CustomerInfo m_CustomerInfo=null;
private WBContentInfo m_WBContentInfo=null;
private OtherBLL m_OtherBLL = new OtherBLL();
private CustomerBLL m_CustomerBLL=new CustomerBLL();
private WorkBillBLL m_WorkBillBLL = new WorkBillBLL();
private WBContentBLL m_WBContentBLL= new WBContentBLL();
private SPServiceNoteBLL m_SPServiceNoteBLL =new SPServiceNoteBLL();
private System.Windows.Forms.Label label5;
private DevExpress.XtraEditors.PanelControl panelControl1;
private DevExpress.XtraEditors.TextEdit tbTelNo;
private DevExpress.XtraEditors.TextEdit tbCallTime;
private DevExpress.XtraEditors.MemoEdit tbOpContent;
private DevExpress.XtraEditors.SimpleButton btnCreatWB;
private DevExpress.XtraEditors.SimpleButton btnRefreshWBL;
private DevExpress.XtraEditors.PanelControl panelControl2;
private DevExpress.XtraEditors.SimpleButton btnRefreshTWBL;
private DevExpress.XtraEditors.SimpleButton simpleButton2;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
#endregion
#region properties
private int WBState{
get{
if("處理中"== this.cmbOPType.Text) {
return 10 ;
}
else if("已處理"== this.cmbOPType.Text) {
return 20;
}
else if("已辦結"== this.cmbOPType.Text) {
return 30;
}
else if("已歸檔"== this.cmbOPType.Text) {
return 40;
}
else {
return -1;
}
}
}
#endregion
#region 構造
public WBCreatUControl(){
InitializeComponent();
InitializeListView();
InitTodayWBListView();
InitializeCmbOPState();
InitializeWBType();
this.m_opId=ShareClass.Operator;
this.m_opName=ShareClass.OperatorChinese;
// this.tcc = (TelCallingControl)MainWindow.telcall;
tcc.CustomerInfoChanged+=new CustomerInfoChangedHandler(tcc_CustomerInfoChanged);
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing ) {
if( disposing ) {
if(components != null) {
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region 組件設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器
/// 修改此方法的內容。
/// </summary>
private void InitializeComponent() {
this.label4 = new System.Windows.Forms.Label();
this.cmbTCType = new System.Windows.Forms.ComboBox();
this.cmbOPType = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panel_WBList = new DevExpress.XtraEditors.PanelControl();
this.panel_TWBList = new DevExpress.XtraEditors.PanelControl();
this.tabControl2 = new Crownwood.Magic.Controls.TabControl();
this.tabP_CreatWB = new Crownwood.Magic.Controls.TabPage();
this.tbOpContent = new DevExpress.XtraEditors.MemoEdit();
this.tbTelNo = new DevExpress.XtraEditors.TextEdit();
this.tbCallTime = new DevExpress.XtraEditors.TextEdit();
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
this.label5 = new System.Windows.Forms.Label();
this.btnRefreshWBL = new DevExpress.XtraEditors.SimpleButton();
this.btnCreatWB = new DevExpress.XtraEditors.SimpleButton();
this.tabP_WBList = new Crownwood.Magic.Controls.TabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.btnRefreshTWBL = new DevExpress.XtraEditors.SimpleButton();
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.panel_WBList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.panel_TWBList)).BeginInit();
this.tabP_CreatWB.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbOpContent.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbTelNo.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbCallTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
this.tabP_WBList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
this.SuspendLayout();
//
// label4
//
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Location = new System.Drawing.Point(48, 168);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 5;
this.label4.Text = "處理類型";
//
// cmbTCType
//
this.cmbTCType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbTCType.Location = new System.Drawing.Point(136, 120);
this.cmbTCType.Name = "cmbTCType";
this.cmbTCType.Size = new System.Drawing.Size(176, 20);
this.cmbTCType.TabIndex = 2;
//
// cmbOPType
//
this.cmbOPType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOPType.Location = new System.Drawing.Point(136, 168);
this.cmbOPType.Name = "cmbOPType";
this.cmbOPType.Size = new System.Drawing.Size(176, 20);
this.cmbOPType.TabIndex = 3;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(48, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 23);
this.label1.TabIndex = 2;
this.label1.Text = "來電號碼";
//
// label2
//
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(48, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 23);
this.label2.TabIndex = 3;
this.label2.Text = "來電時間";
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(48, 120);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 23);
this.label3.TabIndex = 4;
this.label3.Text = "來電類型";
//
// panel_WBList
//
this.panel_WBList.Appearance.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(131)), ((System.Byte)(194)), ((System.Byte)(231)));
this.panel_WBList.Appearance.Options.UseBackColor = true;
this.panel_WBList.Dock = System.Windows.Forms.DockStyle.Right;
this.panel_WBList.Location = new System.Drawing.Point(359, 0);
this.panel_WBList.Name = "panel_WBList";
this.panel_WBList.Size = new System.Drawing.Size(513, 415);
this.panel_WBList.TabIndex = 1;
//
// panel_TWBList
//
this.panel_TWBList.Appearance.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(131)), ((System.Byte)(194)), ((System.Byte)(231)));
this.panel_TWBList.Appearance.Options.UseBackColor = true;
this.panel_TWBList.Dock = System.Windows.Forms.DockStyle.Left;
this.panel_TWBList.Location = new System.Drawing.Point(0, 0);
this.panel_TWBList.Name = "panel_TWBList";
this.panel_TWBList.Size = new System.Drawing.Size(513, 415);
this.panel_TWBList.TabIndex = 0;
//
// tabControl2
//
this.tabControl2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(237)), ((System.Byte)(244)), ((System.Byte)(250)));
this.tabControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl2.Font = new System.Drawing.Font("宋體", 9F);
this.tabControl2.HideTabsMode = Crownwood.Magic.Controls.TabControl.HideTabsModes.ShowAlways;
this.tabControl2.Location = new System.Drawing.Point(0, 0);
this.tabControl2.Name = "tabControl2";
this.tabControl2.PositionTop = true;
this.tabControl2.SelectedIndex = 0;
this.tabControl2.SelectedTab = this.tabP_CreatWB;
this.tabControl2.Size = new System.Drawing.Size(872, 440);
this.tabControl2.TabIndex = 1;
this.tabControl2.TabPages.AddRange(new Crownwood.Magic.Controls.TabPage[] {
this.tabP_CreatWB,
this.tabP_WBList});
this.tabControl2.SelectionChanged += new System.EventHandler(this.tabControl2_SelectionChanged);
//
// tabP_CreatWB
//
this.tabP_CreatWB.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(131)), ((System.Byte)(194)), ((System.Byte)(231)));
this.tabP_CreatWB.Controls.Add(this.tbOpContent);
this.tabP_CreatWB.Controls.Add(this.tbTelNo);
this.tabP_CreatWB.Controls.Add(this.tbCallTime);
this.tabP_CreatWB.Controls.Add(this.cmbTCType);
this.tabP_CreatWB.Controls.Add(this.cmbOPType);
this.tabP_CreatWB.Controls.Add(this.panel_WBList);
this.tabP_CreatWB.Controls.Add(this.panelControl1);
this.tabP_CreatWB.Font = new System.Drawing.Font("宋體", 9F);
this.tabP_CreatWB.Location = new System.Drawing.Point(0, 0);
this.tabP_CreatWB.Name = "tabP_CreatWB";
this.tabP_CreatWB.Size = new System.Drawing.Size(872, 415);
this.tabP_CreatWB.TabIndex = 0;
this.tabP_CreatWB.Title = "生成工單";
//
// tbOpContent
//
this.tbOpContent.EditValue = "";
this.tbOpContent.Location = new System.Drawing.Point(136, 216);
this.tbOpContent.Name = "tbOpContent";
//
// tbOpContent.Properties
//
this.tbOpContent.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.tbOpContent.Size = new System.Drawing.Size(176, 48);
this.tbOpContent.TabIndex = 15;
//
// tbTelNo
//
this.tbTelNo.EditValue = "";
this.tbTelNo.Location = new System.Drawing.Point(136, 32);
this.tbTelNo.Name = "tbTelNo";
//
// tbTelNo.Properties
//
this.tbTelNo.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.tbTelNo.Properties.ReadOnly = true;
this.tbTelNo.Size = new System.Drawing.Size(176, 21);
this.tbTelNo.TabIndex = 0;
//
// tbCallTime
//
this.tbCallTime.EditValue = "";
this.tbCallTime.Location = new System.Drawing.Point(136, 72);
this.tbCallTime.Name = "tbCallTime";
//
// tbCallTime.Properties
//
this.tbCallTime.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.tbCallTime.Properties.ReadOnly = true;
this.tbCallTime.Size = new System.Drawing.Size(176, 21);
this.tbCallTime.TabIndex = 1;
//
// panelControl1
//
this.panelControl1.Controls.Add(this.label5);
this.panelControl1.Controls.Add(this.label4);
this.panelControl1.Controls.Add(this.label1);
this.panelControl1.Controls.Add(this.label2);
this.panelControl1.Controls.Add(this.label3);
this.panelControl1.Controls.Add(this.btnRefreshWBL);
this.panelControl1.Controls.Add(this.btnCreatWB);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl1.Location = new System.Drawing.Point(0, 0);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(872, 415);
this.panelControl1.TabIndex = 14;
this.panelControl1.Text = "panelControl1";
//
// label5
//
this.label5.BackColor = System.Drawing.Color.Transparent;
this.label5.Location = new System.Drawing.Point(48, 224);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 12;
this.label5.Text = "處理內容";
//
// btnRefreshWBL
//
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -