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

📄 databaseobjectinfo_newobj.cs

📁 树形逻辑报表程序源码,能根居元数据定义拖拉开发新的报表.
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace TreeReportApp
{
	/// <summary>
	/// DatabaseObjectInfo_newobj 的摘要说明。
	/// </summary>
	public class DatabaseObjectInfo_newobj : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.RadioButton radioButton_tabletype;
		private System.Windows.Forms.RadioButton radioButton_viewtype;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.DataGrid dataGrid_fields;
		private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
		private System.Windows.Forms.DataGridTextBoxColumn ItemName;
		private System.Windows.Forms.DataGridTextBoxColumn TypeOfData;
		private System.Windows.Forms.DataGridTextBoxColumn EItemDescription;
		private System.Windows.Forms.DataGridTextBoxColumn CItemDescription;
		private System.Windows.Forms.DataGridTextBoxColumn HItemDescription;
		private System.Windows.Forms.DataGridTextBoxColumn ConstrainExp;
		private System.Windows.Forms.Button button_save;
		private System.Windows.Forms.Button button_exit;
		private System.Windows.Forms.TextBox textBox_Edescription;
		private System.Windows.Forms.TextBox textBox_Cdescription;
		private System.Windows.Forms.TextBox textBox_Hdescription;
		private System.Windows.Forms.Button button_browsDBobject;
		private System.Windows.Forms.ComboBox comboBox_CatalogName;
		public System.Windows.Forms.ComboBox comboBox_ObjectName;
		private System.Data.OleDb.OleDbConnection conn;
		private System.Windows.Forms.DataGridTextBoxColumn LengthOfData;
		private System.Windows.Forms.DataGridTextBoxColumn PrecisionOfData;
		private System.Windows.Forms.DataGridTextBoxColumn CheckExp;
		private System.Windows.Forms.DataGridTextBoxColumn ForeignExp;
		System.Data.OleDb.OleDbDataAdapter da;// = new System.Data.OleDb.OleDbDataAdapter("select * from TreeDbObjectInfos_items where ObjectName='" + comboBox_ObjectName.Text + "'", conn);
		System.Data.DataSet ds;// = new System.Data.DataSet();
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public DatabaseObjectInfo_newobj()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();


			this.MaximumSize=this.MinimumSize = this.Size;
			//
			//连接据库,这段程序用一个公共连接类代替
			conn.ConnectionString = TreeConnection.connstr;
			//conn.ConnectionString = "Provider=SQLOLEDB.1;Password=20020830;Persist Security Info=True;User ID=liao;Data Source=LIAOHOME\\LIAOSQLSVR";
			//
		}

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

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.comboBox_ObjectName = new System.Windows.Forms.ComboBox();
			this.comboBox_CatalogName = new System.Windows.Forms.ComboBox();
			this.button_browsDBobject = new System.Windows.Forms.Button();
			this.textBox_Edescription = new System.Windows.Forms.TextBox();
			this.textBox_Cdescription = new System.Windows.Forms.TextBox();
			this.textBox_Hdescription = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.radioButton_tabletype = new System.Windows.Forms.RadioButton();
			this.radioButton_viewtype = new System.Windows.Forms.RadioButton();
			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.button_save = new System.Windows.Forms.Button();
			this.button_exit = new System.Windows.Forms.Button();
			this.dataGrid_fields = new System.Windows.Forms.DataGrid();
			this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
			this.ItemName = new System.Windows.Forms.DataGridTextBoxColumn();
			this.TypeOfData = new System.Windows.Forms.DataGridTextBoxColumn();
			this.LengthOfData = new System.Windows.Forms.DataGridTextBoxColumn();
			this.PrecisionOfData = new System.Windows.Forms.DataGridTextBoxColumn();
			this.EItemDescription = new System.Windows.Forms.DataGridTextBoxColumn();
			this.CItemDescription = new System.Windows.Forms.DataGridTextBoxColumn();
			this.HItemDescription = new System.Windows.Forms.DataGridTextBoxColumn();
			this.ConstrainExp = new System.Windows.Forms.DataGridTextBoxColumn();
			this.CheckExp = new System.Windows.Forms.DataGridTextBoxColumn();
			this.ForeignExp = new System.Windows.Forms.DataGridTextBoxColumn();
			this.conn = new System.Data.OleDb.OleDbConnection();
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid_fields)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.comboBox_ObjectName);
			this.groupBox2.Controls.Add(this.comboBox_CatalogName);
			this.groupBox2.Controls.Add(this.button_browsDBobject);
			this.groupBox2.Controls.Add(this.textBox_Edescription);
			this.groupBox2.Controls.Add(this.textBox_Cdescription);
			this.groupBox2.Controls.Add(this.textBox_Hdescription);
			this.groupBox2.Controls.Add(this.label2);
			this.groupBox2.Controls.Add(this.radioButton_tabletype);
			this.groupBox2.Controls.Add(this.radioButton_viewtype);
			this.groupBox2.Controls.Add(this.label1);
			this.groupBox2.Controls.Add(this.label3);
			this.groupBox2.Controls.Add(this.label4);
			this.groupBox2.Controls.Add(this.label5);
			this.groupBox2.Controls.Add(this.button_save);
			this.groupBox2.Controls.Add(this.button_exit);
			this.groupBox2.Location = new System.Drawing.Point(0, 8);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(592, 144);
			this.groupBox2.TabIndex = 7;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "属性";
			// 
			// comboBox_ObjectName
			// 
			this.comboBox_ObjectName.Location = new System.Drawing.Point(72, 16);
			this.comboBox_ObjectName.Name = "comboBox_ObjectName";
			this.comboBox_ObjectName.Size = new System.Drawing.Size(152, 20);
			this.comboBox_ObjectName.TabIndex = 13;
			this.comboBox_ObjectName.TextChanged += new System.EventHandler(this.comboBox_ObjectName_TextChanged);
			// 
			// comboBox_CatalogName
			// 
			this.comboBox_CatalogName.Location = new System.Drawing.Point(264, 14);
			this.comboBox_CatalogName.Name = "comboBox_CatalogName";
			this.comboBox_CatalogName.Size = new System.Drawing.Size(120, 20);
			this.comboBox_CatalogName.TabIndex = 7;
			// 
			// button_browsDBobject
			// 
			this.button_browsDBobject.Location = new System.Drawing.Point(416, 48);
			this.button_browsDBobject.Name = "button_browsDBobject";
			this.button_browsDBobject.Size = new System.Drawing.Size(144, 24);
			this.button_browsDBobject.TabIndex = 12;
			this.button_browsDBobject.Text = "浏览数据库";
			this.button_browsDBobject.Click += new System.EventHandler(this.button_browsDBobject_Click);
			// 
			// textBox_Edescription
			// 
			this.textBox_Edescription.Location = new System.Drawing.Point(72, 48);
			this.textBox_Edescription.Name = "textBox_Edescription";
			this.textBox_Edescription.Size = new System.Drawing.Size(312, 21);
			this.textBox_Edescription.TabIndex = 11;
			this.textBox_Edescription.Text = "";
			// 
			// textBox_Cdescription
			// 
			this.textBox_Cdescription.Location = new System.Drawing.Point(72, 80);
			this.textBox_Cdescription.Name = "textBox_Cdescription";
			this.textBox_Cdescription.Size = new System.Drawing.Size(312, 21);
			this.textBox_Cdescription.TabIndex = 11;
			this.textBox_Cdescription.Text = "";
			// 
			// textBox_Hdescription
			// 
			this.textBox_Hdescription.Location = new System.Drawing.Point(71, 112);
			this.textBox_Hdescription.Name = "textBox_Hdescription";
			this.textBox_Hdescription.Size = new System.Drawing.Size(312, 21);
			this.textBox_Hdescription.TabIndex = 11;
			this.textBox_Hdescription.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(228, 19);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(43, 16);
			this.label2.TabIndex = 10;
			this.label2.Text = "属于:";
			// 
			// radioButton_tabletype
			// 
			this.radioButton_tabletype.Checked = true;
			this.radioButton_tabletype.Location = new System.Drawing.Point(424, 14);
			this.radioButton_tabletype.Name = "radioButton_tabletype";
			this.radioButton_tabletype.Size = new System.Drawing.Size(64, 21);
			this.radioButton_tabletype.TabIndex = 5;
			this.radioButton_tabletype.TabStop = true;
			this.radioButton_tabletype.Text = "数据表";
			// 
			// radioButton_viewtype
			// 
			this.radioButton_viewtype.Location = new System.Drawing.Point(512, 13);
			this.radioButton_viewtype.Name = "radioButton_viewtype";
			this.radioButton_viewtype.Size = new System.Drawing.Size(72, 21);
			this.radioButton_viewtype.TabIndex = 4;
			this.radioButton_viewtype.Text = "数据视图";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(11, 53);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(69, 16);
			this.label1.TabIndex = 8;
			this.label1.Text = "英文描述:";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(12, 19);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(67, 16);
			this.label3.TabIndex = 8;
			this.label3.Text = "对象名称:";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(10, 85);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(70, 16);
			this.label4.TabIndex = 8;
			this.label4.Text = "简中描述:";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(10, 120);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(70, 16);
			this.label5.TabIndex = 8;
			this.label5.Text = "繁中描述:";
			// 
			// button_save
			// 
			this.button_save.Location = new System.Drawing.Point(416, 80);
			this.button_save.Name = "button_save";
			this.button_save.Size = new System.Drawing.Size(144, 24);
			this.button_save.TabIndex = 12;
			this.button_save.Text = "保    存";
			this.button_save.Click += new System.EventHandler(this.button_save_Click);
			// 
			// button_exit
			// 
			this.button_exit.Location = new System.Drawing.Point(416, 112);
			this.button_exit.Name = "button_exit";
			this.button_exit.Size = new System.Drawing.Size(144, 24);
			this.button_exit.TabIndex = 12;
			this.button_exit.Text = "退     出";
			this.button_exit.Click += new System.EventHandler(this.button_exit_Click);
			// 
			// dataGrid_fields
			// 
			this.dataGrid_fields.BackgroundColor = System.Drawing.Color.Tan;
			this.dataGrid_fields.CaptionText = "数据项属性";
			this.dataGrid_fields.DataMember = "";
			this.dataGrid_fields.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid_fields.Location = new System.Drawing.Point(0, 160);
			this.dataGrid_fields.Name = "dataGrid_fields";
			this.dataGrid_fields.Size = new System.Drawing.Size(592, 264);
			this.dataGrid_fields.TabIndex = 8;
			this.dataGrid_fields.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
																										this.dataGridTableStyle1});
			// 
			// dataGridTableStyle1
			// 
			this.dataGridTableStyle1.DataGrid = this.dataGrid_fields;
			this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
																												  this.ItemName,
																												  this.TypeOfData,
																												  this.LengthOfData,
																												  this.PrecisionOfData,
																												  this.EItemDescription,
																												  this.CItemDescription,
																												  this.HItemDescription,
																												  this.ConstrainExp,
																												  this.CheckExp,
																												  this.ForeignExp});
			this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGridTableStyle1.MappingName = "table";
			// 
			// ItemName
			// 
			this.ItemName.Format = "";
			this.ItemName.FormatInfo = null;
			this.ItemName.HeaderText = "数据项";
			this.ItemName.MappingName = "ItemName";
			this.ItemName.NullText = "";
			this.ItemName.Width = 75;
			// 
			// TypeOfData
			// 
			this.TypeOfData.Format = "";
			this.TypeOfData.FormatInfo = null;
			this.TypeOfData.HeaderText = "数据类型";
			this.TypeOfData.MappingName = "TypeOfData";
			this.TypeOfData.Width = 75;
			// 
			// LengthOfData
			// 
			this.LengthOfData.Format = "";
			this.LengthOfData.FormatInfo = null;
			this.LengthOfData.HeaderText = "数据长";
			this.LengthOfData.MappingName = "LengthOfData";
			this.LengthOfData.Width = 75;
			// 
			// PrecisionOfData
			// 
			this.PrecisionOfData.Format = "";
			this.PrecisionOfData.FormatInfo = null;
			this.PrecisionOfData.HeaderText = "精确度";
			this.PrecisionOfData.MappingName = "PrecisionOfData";
			this.PrecisionOfData.Width = 75;
			// 
			// EItemDescription
			// 
			this.EItemDescription.Format = "";
			this.EItemDescription.FormatInfo = null;
			this.EItemDescription.HeaderText = "英文描述";
			this.EItemDescription.MappingName = "EItemDescription";
			this.EItemDescription.Width = 75;
			// 
			// CItemDescription
			// 
			this.CItemDescription.Format = "";
			this.CItemDescription.FormatInfo = null;
			this.CItemDescription.HeaderText = "简体中文描述";
			this.CItemDescription.MappingName = "CItemDescription";
			this.CItemDescription.Width = 75;
			// 
			// HItemDescription
			// 
			this.HItemDescription.Format = "";
			this.HItemDescription.FormatInfo = null;
			this.HItemDescription.HeaderText = "繁体中文描述";
			this.HItemDescription.MappingName = "HItemDescription";
			this.HItemDescription.Width = 75;
			// 

⌨️ 快捷键说明

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