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

📄 designreportmanageinfodlg.cs

📁 树形逻辑报表程序源码,能根居元数据定义拖拉开发新的报表.
💻 CS
📖 第 1 页 / 共 2 页
字号:
			this.button_setreportpath.Size = new System.Drawing.Size(64, 24);
			this.button_setreportpath.TabIndex = 12;
			this.button_setreportpath.Text = "设置...";
			// 
			// textBox_reportpath
			// 
			this.textBox_reportpath.Enabled = false;
			this.textBox_reportpath.Location = new System.Drawing.Point(176, 43);
			this.textBox_reportpath.Name = "textBox_reportpath";
			this.textBox_reportpath.ReadOnly = true;
			this.textBox_reportpath.Size = new System.Drawing.Size(272, 21);
			this.textBox_reportpath.TabIndex = 11;
			this.textBox_reportpath.Text = "";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(3, 48);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(165, 16);
			this.label9.TabIndex = 10;
			this.label9.Text = "报表RPX布局文件(模板):";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.button_setreportuser);
			this.groupBox3.Controls.Add(this.textBox_reportusers);
			this.groupBox3.Controls.Add(this.label8);
			this.groupBox3.Controls.Add(this.button_setreportowner);
			this.groupBox3.Controls.Add(this.textBox_reportowners);
			this.groupBox3.Controls.Add(this.label7);
			this.groupBox3.Location = new System.Drawing.Point(4, 216);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(522, 72);
			this.groupBox3.TabIndex = 11;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "权限";
			// 
			// button_setreportuser
			// 
			this.button_setreportuser.Location = new System.Drawing.Point(450, 42);
			this.button_setreportuser.Name = "button_setreportuser";
			this.button_setreportuser.Size = new System.Drawing.Size(64, 24);
			this.button_setreportuser.TabIndex = 15;
			this.button_setreportuser.Text = "设置...";
			// 
			// textBox_reportusers
			// 
			this.textBox_reportusers.Enabled = false;
			this.textBox_reportusers.Location = new System.Drawing.Point(131, 44);
			this.textBox_reportusers.Name = "textBox_reportusers";
			this.textBox_reportusers.ReadOnly = true;
			this.textBox_reportusers.Size = new System.Drawing.Size(309, 21);
			this.textBox_reportusers.TabIndex = 14;
			this.textBox_reportusers.Text = "";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(7, 50);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(129, 16);
			this.label8.TabIndex = 13;
			this.label8.Text = "报表使用(查看)者:";
			// 
			// button_setreportowner
			// 
			this.button_setreportowner.Location = new System.Drawing.Point(450, 14);
			this.button_setreportowner.Name = "button_setreportowner";
			this.button_setreportowner.Size = new System.Drawing.Size(64, 24);
			this.button_setreportowner.TabIndex = 12;
			this.button_setreportowner.Text = "设置...";
			// 
			// textBox_reportowners
			// 
			this.textBox_reportowners.Enabled = false;
			this.textBox_reportowners.Location = new System.Drawing.Point(131, 17);
			this.textBox_reportowners.Name = "textBox_reportowners";
			this.textBox_reportowners.ReadOnly = true;
			this.textBox_reportowners.Size = new System.Drawing.Size(309, 21);
			this.textBox_reportowners.TabIndex = 11;
			this.textBox_reportowners.Text = "";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(7, 22);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(129, 16);
			this.label7.TabIndex = 10;
			this.label7.Text = "报表拥有(设计)者:";
			// 
			// button_OK
			// 
			this.button_OK.Location = new System.Drawing.Point(80, 304);
			this.button_OK.Name = "button_OK";
			this.button_OK.Size = new System.Drawing.Size(88, 24);
			this.button_OK.TabIndex = 12;
			this.button_OK.Text = "确  认";
			this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
			// 
			// button_cancel
			// 
			this.button_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.button_cancel.Location = new System.Drawing.Point(320, 304);
			this.button_cancel.Name = "button_cancel";
			this.button_cancel.Size = new System.Drawing.Size(88, 24);
			this.button_cancel.TabIndex = 12;
			this.button_cancel.Text = "取  消";
			this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click);
			// 
			// TreeReportManageInfoDlg
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(528, 341);
			this.ControlBox = false;
			this.Controls.Add(this.button_OK);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.button_setdatadict);
			this.Controls.Add(this.textBox_datadict);
			this.Controls.Add(this.textBox_Hreportname);
			this.Controls.Add(this.textBox_Creportname);
			this.Controls.Add(this.textBox_Ereportname);
			this.Controls.Add(this.textBox_reportid);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.comboBox_catalog);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.button_cancel);
			this.Name = "TreeReportManageInfoDlg";
			this.Text = "报表管理属性";
			this.Load += new System.EventHandler(this.TreeReportManageInfoDlg_Load);
			this.groupBox2.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		private void TreeReportManageInfoDlg_Load(object sender, System.EventArgs e)
		{
			comboBox_catalog.DataSource = ReportManageInfo.getManageCatalogList();
			comboBox_catalog.DisplayMember = "ManageCategory";
			
			if (_IsNewInfo)
			{
				textBox_reportid.Text = "";
				textBox_reportpath.Text = "";
				//comboBox_catalog.Text = "";
				//textBox_Ereportname.Text = "";
				//textBox_Creportname.Text = "";
				//textBox_Hreportname.Text = "";
				//textBox_datadict.Text = "";
				//textBox_reportowners.Text = "";//应填当前用户
				//textBox_reportusers.Text = "";
			}
			else
			{
				textBox_reportid.Text = manageinfo._ReportID;
				textBox_reportpath.Text = manageinfo._ReportPath.Trim();

				/*
				if (manageinfo._ReportPath.Length>0)
				{
					if (manageinfo._ReportPath.EndsWith("\\"))
						textBox_reportpath.Text = manageinfo._ReportPath + manageinfo._ReportFile;
					else
						textBox_reportpath.Text = manageinfo._ReportPath + "\\" + manageinfo._ReportFile;

				}
				*/
			}

			comboBox_catalog.Text = manageinfo._ManageCategory;
			textBox_Ereportname.Text = manageinfo._EReportName;
			textBox_Creportname.Text = manageinfo._CReportName;
			textBox_Hreportname.Text = manageinfo._HReportName;
			textBox_datadict.Text = manageinfo._BusinessDictID;
			textBox_reportowners.Text = manageinfo._ReportOwner;
			textBox_reportusers.Text = manageinfo._ReportUser;

		}

		private void button_OK_Click(object sender, System.EventArgs e)
		{
			if (_IsNewInfo)
			{
				//在新信息情况下,允许输放报表ID,必须对它进行合法性检查
				textBox_reportid.Text = textBox_reportid.Text.Trim();
				comboBox_catalog.Text = comboBox_catalog.Text.Trim();
				
				//不能使用已有的报表ID(名称)
				if (manageinfo.IsExistReportManage(textBox_reportid.Text))
				{
					MessageBox.Show(this,"此ID的报表已存在,不能再建!");
					return;
				}

				if(textBox_reportid.Text.Length==0 || comboBox_catalog.Text.Length==0)
				{
					MessageBox.Show(this,"报表ID(名称)或管理分类不能为空!");
					return;
				}
			}

			//manageinfo._ReportID = textBox_reportid.Text;
			manageinfo.setReportID(textBox_reportid.Text);

			manageinfo._ManageCategory = comboBox_catalog.Text;
			manageinfo._EReportName = textBox_Ereportname.Text;
			manageinfo._CReportName = textBox_Creportname.Text;
			manageinfo._HReportName = textBox_Hreportname.Text;
			
			//manageinfo._BusinessDictID = textBox_datadict.Text;
			manageinfo.setReportDataDict(textBox_datadict.Text);

			manageinfo._ReportPath =  textBox_reportpath.Text.Replace("/","\\").Trim();
			manageinfo._ReportOwner = textBox_reportowners.Text;
			manageinfo._ReportUser = textBox_reportusers.Text;
				
			/*
				int n = textBox_reportfullpath.Text.LastIndexOf("\\");
				if(n>=0)
				{
					manageinfo._ReportPath = "" + textBox_reportfullpath.Text.Substring(0,n+1);
					manageinfo._ReportFile = textBox_reportfullpath.Text.Substring(n+1);
				}
				else
				{
					manageinfo._ReportPath = "";
					manageinfo._ReportFile = textBox_reportfullpath.Text;
				}
				*/

			//保证“可配置信息”与“管理信息”的一致性
			//if(!manageinfo._ReportID.Equals(manageinfo._ConfigInfo.getReportId()))
			//	manageinfo._ConfigInfo.setReportId(manageinfo._ReportID);//在setReportID()中已执行

			//标志数据已改动
			manageinfo.IsDirty = true;
			
			this.DialogResult = DialogResult.OK;
			this.Close();

		}

		private void button_cancel_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void textBox_reportid_TextChanged(object sender, System.EventArgs e)
		{
			textBox_reportpath.Text = "reportlayout\\" + textBox_reportid.Text + ".rpx";
		}

		private void button_setdatadict_Click(object sender, System.EventArgs e)
		{
			TreeReportSelectData selectdatadlg = new TreeReportSelectData();
			selectdatadlg.selecteddiction = textBox_datadict.Text;
			
			if(selectdatadlg.ShowDialog(this)==DialogResult.OK)
			{//重设业务报表数据字典(数据源)
				textBox_datadict.Text = selectdatadlg.selecteddiction;
			}

			selectdatadlg.Dispose();
		}

	}
}

⌨️ 快捷键说明

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