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

📄 designreportmanageinfodlg.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>
	/// TreeReportManageInfoDlg 的摘要说明:
	/// 新的报表只能在IsNewInfo=true的情况下,在此对话框中设置,
	/// 在程序中的其它任何地方、任何情况下都不会设置或修改报表ID,
	/// 新设置报表ID时,在“确认”退出前,要对报表ID的合法性检查。
	/// </summary>
	public class TreeReportManageInfoDlg : System.Windows.Forms.Form
	{
		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.Label label5;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		public System.Windows.Forms.TextBox textBox_reportid;
		private System.Windows.Forms.TextBox textBox_Ereportname;
		private System.Windows.Forms.TextBox textBox_Creportname;
		private System.Windows.Forms.TextBox textBox_Hreportname;
		private System.Windows.Forms.ComboBox comboBox_catalog;
		private System.Windows.Forms.TextBox textBox_datadict;
		private System.Windows.Forms.Button button_setdatadict;
		private System.Windows.Forms.Button button_setreportowner;
		private System.Windows.Forms.TextBox textBox_reportowners;
		private System.Windows.Forms.Button button_setreportuser;
		private System.Windows.Forms.TextBox textBox_reportusers;
		private System.Windows.Forms.Button button_OK;
		private System.Windows.Forms.Button button_cancel;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Button button_setreportpath;
		private System.Windows.Forms.TextBox textBox_reportpath;

		public ReportManageInfo manageinfo=null;
		private System.Data.OleDb.OleDbConnection conn;
		bool _IsNewInfo = true;

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

			//
			//连接据库,这段程序用一个公共连接类代替
			conn.ConnectionString = TreeConnection.connstr;
			//
		}

		public void initTreeReportManageInfoDlg(ReportManageInfo manage_info)
		{
			manageinfo = manage_info;
		}

		/// <summary>
		/// setEditMode -- 设置窗体的显示形式
		/// </summary>
		public void setEditMode( bool IsNewInfo)
		{
			_IsNewInfo = IsNewInfo;
			if(_IsNewInfo)//如果是新建的报表,允许用户输入报表ID (还没有ID)
			{
				textBox_reportid.ReadOnly = false;
				textBox_reportid.Enabled = true;
			}
			else//如果不是新建的报表,不允许用户更改报表ID
			{
				textBox_reportid.ReadOnly = true;
				textBox_reportid.Enabled = false;
			}
		}

		/// <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.label1 = new System.Windows.Forms.Label();
			this.textBox_reportid = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.textBox_Ereportname = new System.Windows.Forms.TextBox();
			this.textBox_Creportname = new System.Windows.Forms.TextBox();
			this.textBox_Hreportname = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.comboBox_catalog = new System.Windows.Forms.ComboBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label6 = new System.Windows.Forms.Label();
			this.textBox_datadict = new System.Windows.Forms.TextBox();
			this.button_setdatadict = new System.Windows.Forms.Button();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.button_setreportpath = new System.Windows.Forms.Button();
			this.textBox_reportpath = new System.Windows.Forms.TextBox();
			this.label9 = new System.Windows.Forms.Label();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.button_setreportuser = new System.Windows.Forms.Button();
			this.textBox_reportusers = new System.Windows.Forms.TextBox();
			this.label8 = new System.Windows.Forms.Label();
			this.button_setreportowner = new System.Windows.Forms.Button();
			this.textBox_reportowners = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.button_OK = new System.Windows.Forms.Button();
			this.button_cancel = new System.Windows.Forms.Button();
			this.conn = new System.Data.OleDb.OleDbConnection();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(104, 16);
			this.label1.TabIndex = 0;
			this.label1.Text = "报表名称(ID):";
			// 
			// textBox_reportid
			// 
			this.textBox_reportid.Location = new System.Drawing.Point(107, 19);
			this.textBox_reportid.Name = "textBox_reportid";
			this.textBox_reportid.Size = new System.Drawing.Size(160, 21);
			this.textBox_reportid.TabIndex = 1;
			this.textBox_reportid.Text = "";
			this.textBox_reportid.TextChanged += new System.EventHandler(this.textBox_reportid_TextChanged);
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(8, 48);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(96, 16);
			this.label2.TabIndex = 0;
			this.label2.Text = "英 文  描 述: ";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(7, 72);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(96, 16);
			this.label3.TabIndex = 0;
			this.label3.Text = "简体中文描述:";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(7, 100);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(96, 16);
			this.label4.TabIndex = 0;
			this.label4.Text = "繁体中文描述:";
			// 
			// textBox_Ereportname
			// 
			this.textBox_Ereportname.Location = new System.Drawing.Point(96, 44);
			this.textBox_Ereportname.Name = "textBox_Ereportname";
			this.textBox_Ereportname.Size = new System.Drawing.Size(424, 21);
			this.textBox_Ereportname.TabIndex = 2;
			this.textBox_Ereportname.Text = "";
			// 
			// textBox_Creportname
			// 
			this.textBox_Creportname.Location = new System.Drawing.Point(96, 68);
			this.textBox_Creportname.Name = "textBox_Creportname";
			this.textBox_Creportname.Size = new System.Drawing.Size(424, 21);
			this.textBox_Creportname.TabIndex = 2;
			this.textBox_Creportname.Text = "";
			// 
			// textBox_Hreportname
			// 
			this.textBox_Hreportname.Location = new System.Drawing.Point(96, 93);
			this.textBox_Hreportname.Name = "textBox_Hreportname";
			this.textBox_Hreportname.Size = new System.Drawing.Size(424, 21);
			this.textBox_Hreportname.TabIndex = 2;
			this.textBox_Hreportname.Text = "";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(278, 23);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(72, 16);
			this.label5.TabIndex = 3;
			this.label5.Text = "管理分类:";
			// 
			// comboBox_catalog
			// 
			this.comboBox_catalog.Location = new System.Drawing.Point(340, 16);
			this.comboBox_catalog.Name = "comboBox_catalog";
			this.comboBox_catalog.Size = new System.Drawing.Size(180, 20);
			this.comboBox_catalog.TabIndex = 4;
			// 
			// groupBox1
			// 
			this.groupBox1.Location = new System.Drawing.Point(4, 3);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(522, 120);
			this.groupBox1.TabIndex = 5;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "标识";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(7, 153);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(177, 16);
			this.label6.TabIndex = 6;
			this.label6.Text = "报表数据源(业务数据字典):";
			// 
			// textBox_datadict
			// 
			this.textBox_datadict.Enabled = false;
			this.textBox_datadict.Location = new System.Drawing.Point(180, 148);
			this.textBox_datadict.Name = "textBox_datadict";
			this.textBox_datadict.ReadOnly = true;
			this.textBox_datadict.Size = new System.Drawing.Size(272, 21);
			this.textBox_datadict.TabIndex = 7;
			this.textBox_datadict.Text = "";
			// 
			// button_setdatadict
			// 
			this.button_setdatadict.Location = new System.Drawing.Point(458, 147);
			this.button_setdatadict.Name = "button_setdatadict";
			this.button_setdatadict.Size = new System.Drawing.Size(64, 24);
			this.button_setdatadict.TabIndex = 9;
			this.button_setdatadict.Text = "设置...";
			this.button_setdatadict.Click += new System.EventHandler(this.button_setdatadict_Click);
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.button_setreportpath);
			this.groupBox2.Controls.Add(this.textBox_reportpath);
			this.groupBox2.Controls.Add(this.label9);
			this.groupBox2.Location = new System.Drawing.Point(4, 133);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(522, 75);
			this.groupBox2.TabIndex = 10;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "数据";
			// 
			// button_setreportpath
			// 
			this.button_setreportpath.Location = new System.Drawing.Point(454, 42);
			this.button_setreportpath.Name = "button_setreportpath";

⌨️ 快捷键说明

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