⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 telcallingcontrol.cs

📁 汽车销售公司ERP进销存系统 汽车销售公司ERP进销存系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
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.BaseForms.Models;

namespace CallCenter.BusinessInterfaces.BaseForms {

	

	/// <summary>
	/// TelCallingControl 来电窗口。
	/// author:yanqingxi
	/// </summary>
	public class TelCallingControl : System.Windows.Forms.UserControl {

		#region fields
		private DevExpress.LookAndFeel.DefaultLookAndFeel defaultLookAndFeel1;
		public event CustomerInfoChangedHandler CustomerInfoChanged = null;
		public static CustomerInfo CurrentCustomerInfo=null;
		private System.Windows.Forms.ComboBox cmbCustmType;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label2;

		private int customerId=0;
		public string ctelnumber="";
		private bool isNewTel=false;
		private CustomerInfo  m_customerInfo=null;
		private CustomerBLL customerBLL=new CustomerBLL();
		private WorkBillBLL workBillBLL = new WorkBillBLL();
		
		#endregion

		private DevExpress.XtraEditors.TextEdit tbTelCNo;
		private DevExpress.XtraEditors.TextEdit tbCallingTime;
		private DevExpress.XtraEditors.PanelControl panelControl1;
		private DevExpress.XtraEditors.TextEdit tbCName;
		private DevExpress.XtraEditors.TextEdit tbCcontact;
		private DevExpress.XtraEditors.TextEdit tbCFax;
		private DevExpress.XtraEditors.TextEdit tbCEmail;
		private DevExpress.XtraEditors.TextEdit tbCAddress;
		private DevExpress.XtraEditors.TextEdit tbCcomment;
		private DevExpress.XtraEditors.ComboBoxEdit cmbCSex;
		private DevExpress.XtraEditors.SimpleButton btnRetrieve;
		private DevExpress.XtraEditors.SimpleButton btnReset;
		private DevExpress.XtraEditors.SimpleButton btnSave;
		private System.ComponentModel.IContainer components;

		#region properties
		private int CustomerCtype{
		
			get{
				if(this.cmbCustmType.SelectedValue is int){
					return (int)this.cmbCustmType.SelectedValue;
				}
				return -1;
			}
		}

		#endregion

		#region 构造


		public TelCallingControl() {
			// 该调用是 Windows.Forms 窗体设计器所必需的。
			InitializeComponent();
			InitializeCmbCustmType();
			InitializeCmbSex();
			// TODO: 在 InitializeComponent 调用后添加任何初始化

		}

		/// <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.components = new System.ComponentModel.Container();
			this.defaultLookAndFeel1 = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
			this.cmbCustmType = new System.Windows.Forms.ComboBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.tbTelCNo = new DevExpress.XtraEditors.TextEdit();
			this.tbCallingTime = new DevExpress.XtraEditors.TextEdit();
			this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
			this.tbCName = new DevExpress.XtraEditors.TextEdit();
			this.tbCcontact = new DevExpress.XtraEditors.TextEdit();
			this.tbCFax = new DevExpress.XtraEditors.TextEdit();
			this.tbCEmail = new DevExpress.XtraEditors.TextEdit();
			this.tbCAddress = new DevExpress.XtraEditors.TextEdit();
			this.tbCcomment = new DevExpress.XtraEditors.TextEdit();
			this.cmbCSex = new DevExpress.XtraEditors.ComboBoxEdit();
			this.btnRetrieve = new DevExpress.XtraEditors.SimpleButton();
			this.btnReset = new DevExpress.XtraEditors.SimpleButton();
			this.btnSave = new DevExpress.XtraEditors.SimpleButton();
			((System.ComponentModel.ISupportInitialize)(this.tbTelCNo.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCallingTime.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
			this.panelControl1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.tbCName.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCcontact.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCFax.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCEmail.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCAddress.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCcomment.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.cmbCSex.Properties)).BeginInit();
			this.SuspendLayout();
			// 
			// defaultLookAndFeel1
			// 
			this.defaultLookAndFeel1.LookAndFeel.SkinName = "Liquid Sky";
			this.defaultLookAndFeel1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin;
			this.defaultLookAndFeel1.LookAndFeel.UseWindowsXPTheme = false;
			// 
			// cmbCustmType
			// 
			this.cmbCustmType.Location = new System.Drawing.Point(624, 16);
			this.cmbCustmType.Name = "cmbCustmType";
			this.cmbCustmType.Size = new System.Drawing.Size(120, 20);
			this.cmbCustmType.TabIndex = 4;
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.Transparent;
			this.label1.Location = new System.Drawing.Point(384, 80);
			this.label1.Name = "label1";
			this.label1.TabIndex = 40;
			this.label1.Text = "备    注";
			// 
			// label3
			// 
			this.label3.BackColor = System.Drawing.Color.Transparent;
			this.label3.Location = new System.Drawing.Point(384, 19);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(72, 23);
			this.label3.TabIndex = 25;
			this.label3.Text = "客户姓名";
			// 
			// label4
			// 
			this.label4.BackColor = System.Drawing.Color.Transparent;
			this.label4.Location = new System.Drawing.Point(16, 48);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(72, 23);
			this.label4.TabIndex = 27;
			this.label4.Text = "客户性别";
			// 
			// label5
			// 
			this.label5.BackColor = System.Drawing.Color.Transparent;
			this.label5.Location = new System.Drawing.Point(16, 80);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(72, 23);
			this.label5.TabIndex = 29;
			this.label5.Text = "客户地址";
			// 
			// label6
			// 
			this.label6.BackColor = System.Drawing.Color.Transparent;
			this.label6.Location = new System.Drawing.Point(200, 48);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(72, 23);
			this.label6.TabIndex = 31;
			this.label6.Text = "联系方式";
			// 
			// label7
			// 
			this.label7.BackColor = System.Drawing.Color.Transparent;
			this.label7.Location = new System.Drawing.Point(568, 48);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(72, 23);
			this.label7.TabIndex = 33;
			this.label7.Text = "电子邮件";
			// 
			// label8
			// 
			this.label8.BackColor = System.Drawing.Color.Transparent;
			this.label8.Location = new System.Drawing.Point(384, 48);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(72, 23);
			this.label8.TabIndex = 35;
			this.label8.Text = "传真号码";
			// 
			// label9
			// 
			this.label9.BackColor = System.Drawing.Color.Transparent;
			this.label9.Location = new System.Drawing.Point(568, 19);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(72, 23);
			this.label9.TabIndex = 36;
			this.label9.Text = "客户类别";
			// 
			// label10
			// 
			this.label10.BackColor = System.Drawing.Color.Transparent;
			this.label10.Location = new System.Drawing.Point(16, 19);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(80, 23);
			this.label10.TabIndex = 38;
			this.label10.Text = "来电号码";
			// 
			// label2
			// 
			this.label2.BackColor = System.Drawing.Color.Transparent;
			this.label2.Location = new System.Drawing.Point(200, 19);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(72, 23);
			this.label2.TabIndex = 43;
			this.label2.Text = "来电时间";
			// 
			// tbTelCNo
			// 
			this.tbTelCNo.EditValue = "";
			this.tbTelCNo.Location = new System.Drawing.Point(72, 16);
			this.tbTelCNo.Name = "tbTelCNo";
			// 
			// tbTelCNo.Properties
			// 
			this.tbTelCNo.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbTelCNo.Properties.ReadOnly = true;
			this.tbTelCNo.Size = new System.Drawing.Size(120, 21);
			this.tbTelCNo.TabIndex = 44;
			// 
			// tbCallingTime
			// 
			this.tbCallingTime.EditValue = "";
			this.tbCallingTime.Location = new System.Drawing.Point(256, 16);
			this.tbCallingTime.Name = "tbCallingTime";
			// 
			// tbCallingTime.Properties
			// 
			this.tbCallingTime.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCallingTime.Properties.ReadOnly = true;
			this.tbCallingTime.Size = new System.Drawing.Size(120, 21);
			this.tbCallingTime.TabIndex = 45;
			// 
			// panelControl1
			// 
			this.panelControl1.Controls.Add(this.btnRetrieve);
			this.panelControl1.Controls.Add(this.btnReset);
			this.panelControl1.Controls.Add(this.btnSave);
			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, 117);
			this.panelControl1.TabIndex = 46;
			this.panelControl1.Text = "panelControl1";
			// 
			// tbCName
			// 
			this.tbCName.EditValue = "";
			this.tbCName.Location = new System.Drawing.Point(440, 16);
			this.tbCName.Name = "tbCName";
			// 
			// tbCName.Properties
			// 
			this.tbCName.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCName.Size = new System.Drawing.Size(120, 21);
			this.tbCName.TabIndex = 0;
			// 
			// tbCcontact
			// 
			this.tbCcontact.EditValue = "";
			this.tbCcontact.Location = new System.Drawing.Point(256, 48);
			this.tbCcontact.Name = "tbCcontact";
			// 
			// tbCcontact.Properties
			// 
			this.tbCcontact.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCcontact.Size = new System.Drawing.Size(120, 21);
			this.tbCcontact.TabIndex = 0;
			// 
			// tbCFax
			// 
			this.tbCFax.EditValue = "";
			this.tbCFax.Location = new System.Drawing.Point(440, 48);
			this.tbCFax.Name = "tbCFax";
			// 
			// tbCFax.Properties
			// 
			this.tbCFax.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCFax.Size = new System.Drawing.Size(120, 21);
			this.tbCFax.TabIndex = 0;
			// 
			// tbCEmail
			// 
			this.tbCEmail.EditValue = "";
			this.tbCEmail.Location = new System.Drawing.Point(624, 48);
			this.tbCEmail.Name = "tbCEmail";
			// 
			// tbCEmail.Properties
			// 
			this.tbCEmail.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCEmail.Size = new System.Drawing.Size(120, 21);
			this.tbCEmail.TabIndex = 47;
			// 
			// tbCAddress
			// 
			this.tbCAddress.EditValue = "";
			this.tbCAddress.Location = new System.Drawing.Point(72, 80);
			this.tbCAddress.Name = "tbCAddress";
			// 
			// tbCAddress.Properties
			// 
			this.tbCAddress.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCAddress.Size = new System.Drawing.Size(304, 21);
			this.tbCAddress.TabIndex = 48;
			// 
			// tbCcomment
			// 
			this.tbCcomment.EditValue = "";
			this.tbCcomment.Location = new System.Drawing.Point(440, 80);
			this.tbCcomment.Name = "tbCcomment";
			// 
			// tbCcomment.Properties
			// 
			this.tbCcomment.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.tbCcomment.Size = new System.Drawing.Size(304, 21);
			this.tbCcomment.TabIndex = 49;
			// 
			// cmbCSex
			// 
			this.cmbCSex.EditValue = "";
			this.cmbCSex.Location = new System.Drawing.Point(72, 48);
			this.cmbCSex.Name = "cmbCSex";
			// 
			// cmbCSex.Properties
			// 
			this.cmbCSex.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
			this.cmbCSex.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
																											new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
			this.cmbCSex.Properties.Items.AddRange(new object[] {
																	"男",
																	"女"});
			this.cmbCSex.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
			this.cmbCSex.Size = new System.Drawing.Size(120, 21);
			this.cmbCSex.TabIndex = 0;
			// 
			// btnRetrieve
			// 
			this.btnRetrieve.Location = new System.Drawing.Point(768, 16);
			this.btnRetrieve.Name = "btnRetrieve";
			this.btnRetrieve.TabIndex = 0;
			this.btnRetrieve.Text = "客户查询";
			this.btnRetrieve.Click += new System.EventHandler(this.btnRetrieve_Click);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -