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

📄 workbillform.cs

📁 汽车销售公司ERP进销存系统 汽车销售公司ERP进销存系统
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

using CallCenter.Modules;
using CallCenter.BusinessLayer;
using CallCenter.BusinessInterfaces;
using CallCenter.BusinessInterfaces.MainForms;
using CallCenter.BusinessInterfaces.BaseForms.Models;

namespace CallCenter.BusinessInterfaces.BaseForms {
	/// <summary>
	/// WorkBillForm 的摘要说明。
	/// author:yanqingxi
	/// </summary>
	public class WorkBillForm : 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 DevExpress.XtraEditors.PanelControl AutoOpContentPanel;
		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 int m_wid=-1;
		private IList m_spList;
		private IList satisfyList;
		private bool isNeedSavedOPC=false;
		private bool isNeedSavedWBC=false;
		private string m_opId=string.Empty;
		private string m_opName=string.Empty;
		private CustomerInfo m_CustomerInfo=null;
		private WorkBillInfo m_WorkBillInfo=null;
		private WBContentInfo m_WBContentInfo=null;
		private OtherBLL m_OtherBLL = new OtherBLL();
		private WorkBillBLL m_WorkBillBLL = new WorkBillBLL();
		private WBContentBLL m_WBContentBLL= new WBContentBLL();
		private DevExpress.XtraEditors.TextEdit tbTelNo;
		private DevExpress.XtraEditors.TextEdit tbCName;
		private DevExpress.XtraEditors.TextEdit tbCcontact;
		private DevExpress.XtraEditors.TextEdit tbCAddress;
		private DevExpress.XtraEditors.TextEdit tbCallingTime;
		private DevExpress.XtraEditors.TextEdit tbCtype;
		private DevExpress.XtraEditors.TextEdit tbCsex;
		private DevExpress.XtraEditors.MemoEdit tbWBBrief;
		private DevExpress.XtraEditors.MemoEdit tbCComment;
		private DevExpress.XtraEditors.TextEdit tbOpName;
		private DevExpress.XtraEditors.TextEdit tbOpDate;
		private DevExpress.XtraEditors.MemoEdit tbOpContent;
		private DevExpress.XtraEditors.SimpleButton button1;
		private DevExpress.XtraEditors.SimpleButton btnClose;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
	
		#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 WorkBillForm() { 
			//
			// Windows 窗体设计器支持所必需的
			//
			
			InitializeComponent();
			InitializeCombCState();
			InitializeCmbWBState();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		public WorkBillForm(CustomerInfo customerInfo):this(){

			this.m_CustomerInfo= customerInfo;
			RoleLimit();
		}

		public WorkBillForm(CustomerInfo customerInfo,WorkBillInfo workBillInfo):this(customerInfo){

			if(workBillInfo==null){
				return ;
			}
			this.m_opId=ShareClass.Operator;
			this.m_opName=ShareClass.OperatorChinese;
			this.m_WorkBillInfo = workBillInfo;
			this.m_wid = workBillInfo.id;
			DownLoadCustomerInfo(customerInfo);
			GetWBContent(m_wid);
			DownLoadWorkBillInfo(workBillInfo);
		}

		/// <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.label14 = new System.Windows.Forms.Label();
			this.AutoOpContentPanel = new DevExpress.XtraEditors.PanelControl();
			this.label11 = new System.Windows.Forms.Label();
			this.label10 = 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.tbCAddress = new DevExpress.XtraEditors.TextEdit();
			this.tbCallingTime = new DevExpress.XtraEditors.TextEdit();
			this.tbCtype = new DevExpress.XtraEditors.TextEdit();
			this.tbCsex = new DevExpress.XtraEditors.TextEdit();
			this.tbWBBrief = new DevExpress.XtraEditors.MemoEdit();
			this.tbCComment = new DevExpress.XtraEditors.MemoEdit();
			this.tbOpName = new DevExpress.XtraEditors.TextEdit();
			this.tbOpDate = new DevExpress.XtraEditors.TextEdit();
			this.tbOpContent = 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.AutoOpContentPanel)).BeginInit();
			((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.tbCAddress.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.tbWBBrief.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbCComment.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbOpName.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbOpDate.Properties)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbOpContent.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, 346);
			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 = 3;
			// 
			// 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.tbCsex);
			this.groupBox1.Controls.Add(this.tbCtype);
			this.groupBox1.Controls.Add(this.tbCallingTime);
			this.groupBox1.Controls.Add(this.tbCAddress);
			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(5, 5);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(440, 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";

⌨️ 快捷键说明

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