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

📄 knowledgemanage.cs

📁 c#编写的汽车销售公司erp进销存系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using CallCenter.DALFactory;
using CallCenter.IDAL;
using CallCenter.Modules;
using CallCenter.BusinessLayer;
using DevExpress.Utils;
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Columns;
using DevExpress.XtraTreeList.Nodes;

namespace CallCenter.BusinessInterfaces.MainForms
{
	/// <summary>
	/// KnowledgeManage 的摘要说明。
	/// </summary>
	public class KnowledgeManage : System.Windows.Forms.UserControl
	{
		private DevExpress.XtraTreeList.Columns.TreeListColumn colTNAME;
		private DevExpress.XtraTreeList.Columns.TreeListColumn colOAMARK;
		private DevExpress.XtraTreeList.Columns.TreeListColumn colID;
		private DevExpress.XtraTreeList.Columns.TreeListColumn colPARENTID;
		private System.Data.DataSet ds;	
		private KnowledgeTypeBLL bll = new KnowledgeTypeBLL();
		private System.Windows.Forms.Panel panel1;
		private DevExpress.XtraTreeList.TreeList treeList1;
		private System.Windows.Forms.Panel panel2;
		private int i=0;
		private string strnumber="";
		private KnowledgeInfo knowledgeinfo=null;
		private CallCenter.BusinessInterfaces.MainForms.HRichTextBox hRichTextBox1;
		private System.Windows.Forms.Button btReset;
		private System.Windows.Forms.Button btAdd;
		private System.Windows.Forms.ComboBox cboamark;
		private System.Windows.Forms.TextBox txtcamount;
		private System.Windows.Forms.TextBox txtiamount;
		private System.Windows.Forms.TextBox txtoamount;
		private System.Windows.Forms.TextBox txtkaname;
		private System.Windows.Forms.TextBox txtkaid;
		private System.Windows.Forms.TextBox txtkwdate;
		private System.Windows.Forms.TextBox txtkwname;
		private System.Windows.Forms.TextBox txtkwid;
		private System.Windows.Forms.TextBox txtkkeywords;
		private System.Windows.Forms.TextBox txtktype;
		private System.Windows.Forms.TextBox txtktitle;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TabControl tabControl1;
		private System.Windows.Forms.Panel panel3;


		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public KnowledgeManage()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			ds = bll.getKnowledgeType("KNOWLEDGETYPE");
			ClearData();
			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}
		public KnowledgeManage(KnowledgeInfo kinfo)
		{
			InitializeComponent();
			try
			{
				ds = bll.getKnowledgeType("KNOWLEDGETYPE");
				knowledgeinfo=new KnowledgeInfo();
				knowledgeinfo=kinfo;
				this.txtktitle.Text=kinfo.ktitle;
				string str="";
				strnumber=kinfo.ktype.Substring(1,kinfo.ktype.Length - 1);
				string s=kinfo.ktype.Substring(1,kinfo.ktype.Length - 2);
				//			MessageBox.Show(s);
				DataRow[] drp=ds.Tables["KNOWLEDGETYPE"].Select("id in ("+s+")");
				foreach(DataRow dr in drp)
				{
					str+=dr[ds.Tables["KNOWLEDGETYPE"].Columns["tname"]].ToString()+",";
				}
				//////kinfo.ktype=","+strnumber;
				this.txtktype.Text=","+str;
				this.txtkkeywords.Text=kinfo.kkeywords;
				this.txtkwid.Text=kinfo.kwid;
				this.txtkwname.Text=kinfo.kwname;
				this.txtkwdate.Text=kinfo.kwdate;//DateTime.Today.ToString();
				if(kinfo.oamark==0)
				{
					this.cboamark.Text="不可访问";
				}
				else
				{
					this.cboamark.Text="可访问";
				}
				this.txtkaid.Text=kinfo.kaid;
				this.txtkaname.Text=kinfo.kaname;
				this.txtoamount.Text=kinfo.oamount.ToString();
				this.txtiamount.Text=kinfo.iamount.ToString();
				this.txtcamount.Text=kinfo.camount.ToString();
//				this.txtkcontent.Rtf=kinfo.kcontent;
				this.hRichTextBox1.RtfText=kinfo.kcontent;
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message);
			}

		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
//			i=0;
			if( disposing )
			{
				if(components != null)
				{
					
					components.Dispose();
					
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.panel1 = new System.Windows.Forms.Panel();
			this.treeList1 = new DevExpress.XtraTreeList.TreeList();
			this.panel2 = new System.Windows.Forms.Panel();
			this.btReset = new System.Windows.Forms.Button();
			this.btAdd = new System.Windows.Forms.Button();
			this.cboamark = new System.Windows.Forms.ComboBox();
			this.txtkkeywords = new System.Windows.Forms.TextBox();
			this.txtktype = new System.Windows.Forms.TextBox();
			this.txtktitle = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.tabControl1 = new System.Windows.Forms.TabControl();
			this.txtcamount = new System.Windows.Forms.TextBox();
			this.txtiamount = new System.Windows.Forms.TextBox();
			this.txtoamount = new System.Windows.Forms.TextBox();
			this.txtkaid = new System.Windows.Forms.TextBox();
			this.txtkwdate = new System.Windows.Forms.TextBox();
			this.txtkwname = new System.Windows.Forms.TextBox();
			this.txtkwid = new System.Windows.Forms.TextBox();
			this.label12 = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.txtkaname = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.panel3 = new System.Windows.Forms.Panel();
			this.hRichTextBox1 = new CallCenter.BusinessInterfaces.MainForms.HRichTextBox();
			this.panel1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit();
			this.panel2.SuspendLayout();
			this.SuspendLayout();
			// 
			// panel1
			// 
			this.panel1.Controls.Add(this.treeList1);
			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(184, 549);
			this.panel1.TabIndex = 0;
			// 
			// treeList1
			// 
			this.treeList1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.treeList1.Location = new System.Drawing.Point(0, 0);
			this.treeList1.Name = "treeList1";
			this.treeList1.Size = new System.Drawing.Size(184, 549);
			this.treeList1.TabIndex = 0;
			// 
			// panel2
			// 
			this.panel2.Controls.Add(this.btReset);
			this.panel2.Controls.Add(this.btAdd);
			this.panel2.Controls.Add(this.cboamark);
			this.panel2.Controls.Add(this.txtkkeywords);
			this.panel2.Controls.Add(this.txtktype);
			this.panel2.Controls.Add(this.txtktitle);
			this.panel2.Controls.Add(this.label7);
			this.panel2.Controls.Add(this.label3);
			this.panel2.Controls.Add(this.label2);
			this.panel2.Controls.Add(this.label1);
			this.panel2.Controls.Add(this.tabControl1);
			this.panel2.Controls.Add(this.txtcamount);
			this.panel2.Controls.Add(this.txtiamount);
			this.panel2.Controls.Add(this.txtoamount);
			this.panel2.Controls.Add(this.txtkaid);
			this.panel2.Controls.Add(this.txtkwdate);
			this.panel2.Controls.Add(this.txtkwname);
			this.panel2.Controls.Add(this.txtkwid);
			this.panel2.Controls.Add(this.label12);
			this.panel2.Controls.Add(this.label11);
			this.panel2.Controls.Add(this.label10);
			this.panel2.Controls.Add(this.label9);
			this.panel2.Controls.Add(this.label8);
			this.panel2.Controls.Add(this.label6);
			this.panel2.Controls.Add(this.label5);
			this.panel2.Controls.Add(this.txtkaname);
			this.panel2.Controls.Add(this.label4);
			this.panel2.Controls.Add(this.panel3);
			this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel2.Location = new System.Drawing.Point(184, 0);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(668, 128);
			this.panel2.TabIndex = 2;
			// 
			// btReset
			// 
			this.btReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btReset.Location = new System.Drawing.Point(584, 64);
			this.btReset.Name = "btReset";
			this.btReset.Size = new System.Drawing.Size(75, 24);
			this.btReset.TabIndex = 57;
			this.btReset.Text = "清空";
			this.btReset.Click += new System.EventHandler(this.btReset_Click);
			// 
			// btAdd
			// 
			this.btAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btAdd.Location = new System.Drawing.Point(584, 16);
			this.btAdd.Name = "btAdd";
			this.btAdd.Size = new System.Drawing.Size(75, 24);
			this.btAdd.TabIndex = 54;
			this.btAdd.Tag = "添加";
			this.btAdd.Text = "添加";
			this.btAdd.Click += new System.EventHandler(this.btAdd_Click);
			// 
			// cboamark
			// 
			this.cboamark.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboamark.ItemHeight = 12;
			this.cboamark.Items.AddRange(new object[] {
														  "不可访问",
														  "可访问"});
			this.cboamark.Location = new System.Drawing.Point(120, 96);
			this.cboamark.Name = "cboamark";
			this.cboamark.Size = new System.Drawing.Size(128, 20);
			this.cboamark.TabIndex = 53;
			// 
			// txtkkeywords
			// 
			this.txtkkeywords.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtkkeywords.Location = new System.Drawing.Point(75, 68);
			this.txtkkeywords.Name = "txtkkeywords";
			this.txtkkeywords.Size = new System.Drawing.Size(496, 21);
			this.txtkkeywords.TabIndex = 44;
			this.txtkkeywords.Text = "";
			// 
			// txtktype
			// 
			this.txtktype.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtktype.Location = new System.Drawing.Point(75, 44);
			this.txtktype.Name = "txtktype";
			this.txtktype.ReadOnly = true;
			this.txtktype.Size = new System.Drawing.Size(496, 21);
			this.txtktype.TabIndex = 43;
			this.txtktype.Text = "";
			// 
			// txtktitle
			// 
			this.txtktitle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtktitle.Location = new System.Drawing.Point(75, 20);
			this.txtktitle.Name = "txtktitle";
			this.txtktitle.Size = new System.Drawing.Size(496, 21);
			this.txtktitle.TabIndex = 42;
			this.txtktitle.Text = "";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(8, 96);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(80, 23);
			this.label7.TabIndex = 36;
			this.label7.Text = "外网访问标识";
			this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(11, 68);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(64, 23);
			this.label3.TabIndex = 32;
			this.label3.Text = "关键字";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(11, 44);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(64, 23);
			this.label2.TabIndex = 31;
			this.label2.Text = "知识类别";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(11, 20);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(64, 23);
			this.label1.TabIndex = 30;
			this.label1.Text = "知识标题";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// tabControl1
			// 
			this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.tabControl1.Location = new System.Drawing.Point(0, 0);
			this.tabControl1.Name = "tabControl1";
			this.tabControl1.SelectedIndex = 0;
			this.tabControl1.Size = new System.Drawing.Size(668, 128);
			this.tabControl1.TabIndex = 58;
			// 
			// txtcamount
			// 
			this.txtcamount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtcamount.Location = new System.Drawing.Point(472, 232);
			this.txtcamount.Name = "txtcamount";
			this.txtcamount.ReadOnly = true;
			this.txtcamount.Size = new System.Drawing.Size(88, 21);
			this.txtcamount.TabIndex = 52;
			this.txtcamount.Text = "";
			// 
			// txtiamount
			// 
			this.txtiamount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtiamount.Location = new System.Drawing.Point(472, 208);
			this.txtiamount.Name = "txtiamount";
			this.txtiamount.ReadOnly = true;
			this.txtiamount.Size = new System.Drawing.Size(88, 21);
			this.txtiamount.TabIndex = 51;
			this.txtiamount.Text = "";
			// 
			// txtoamount
			// 
			this.txtoamount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtoamount.Location = new System.Drawing.Point(472, 184);
			this.txtoamount.Name = "txtoamount";
			this.txtoamount.ReadOnly = true;
			this.txtoamount.Size = new System.Drawing.Size(88, 21);
			this.txtoamount.TabIndex = 50;
			this.txtoamount.Text = "";
			// 
			// txtkaid
			// 
			this.txtkaid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtkaid.Location = new System.Drawing.Point(272, 208);
			this.txtkaid.Name = "txtkaid";
			this.txtkaid.ReadOnly = true;
			this.txtkaid.Size = new System.Drawing.Size(128, 21);
			this.txtkaid.TabIndex = 48;
			this.txtkaid.Text = "";
			// 
			// txtkwdate
			// 
			this.txtkwdate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtkwdate.Location = new System.Drawing.Point(64, 232);
			this.txtkwdate.Name = "txtkwdate";
			this.txtkwdate.ReadOnly = true;
			this.txtkwdate.Size = new System.Drawing.Size(128, 21);
			this.txtkwdate.TabIndex = 47;
			this.txtkwdate.Text = "";
			// 
			// txtkwname
			// 
			this.txtkwname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtkwname.Location = new System.Drawing.Point(64, 208);
			this.txtkwname.Name = "txtkwname";
			this.txtkwname.ReadOnly = true;
			this.txtkwname.Size = new System.Drawing.Size(128, 21);
			this.txtkwname.TabIndex = 46;
			this.txtkwname.Text = "";
			// 
			// txtkwid
			// 
			this.txtkwid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.txtkwid.Location = new System.Drawing.Point(216, 240);
			this.txtkwid.Name = "txtkwid";
			this.txtkwid.ReadOnly = true;
			this.txtkwid.Size = new System.Drawing.Size(128, 21);
			this.txtkwid.TabIndex = 45;
			this.txtkwid.Text = "";
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(408, 232);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(72, 23);
			this.label12.TabIndex = 41;
			this.label12.Text = "坐席访问量";
			this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(408, 208);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(64, 23);
			this.label11.TabIndex = 40;
			this.label11.Text = "IVR访问量";
			this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(408, 184);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(72, 23);
			this.label10.TabIndex = 39;
			this.label10.Text = "外网访问量";
			this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(192, 232);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(72, 23);
			this.label9.TabIndex = 38;
			this.label9.Text = "审核人姓名";
			this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 

⌨️ 快捷键说明

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