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

📄 mainform.cs

📁 《数据库原理及应用》-刘玉宝主编-源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
			this.cSortCo.DataType = typeof(object);
			this.cSortCo.ReadOnly = true;
			// 
			// cLevelCo
			// 
			this.cLevelCo.ColumnMapping = System.Data.MappingType.Hidden;
			this.cLevelCo.ColumnName = "级别编号";
			this.cLevelCo.DataType = typeof(object);
			this.cLevelCo.ReadOnly = true;
			// 
			// cYear
			// 
			this.cYear.ColumnMapping = System.Data.MappingType.Hidden;
			this.cYear.ColumnName = "年份";
			this.cYear.DataType = typeof(object);
			this.cYear.ReadOnly = true;
			// 
			// cSerial
			// 
			this.cSerial.ColumnMapping = System.Data.MappingType.Hidden;
			this.cSerial.ColumnName = "序号";
			this.cSerial.DataType = typeof(object);
			this.cSerial.ReadOnly = true;
			// 
			// cTaskCo
			// 
			this.cTaskCo.ColumnName = "课题编号";
			this.cTaskCo.DataType = typeof(object);
			this.cTaskCo.ReadOnly = true;
			// 
			// cTaskNa
			// 
			this.cTaskNa.ColumnName = "课题名称";
			this.cTaskNa.DataType = typeof(object);
			this.cTaskNa.ReadOnly = true;
			// 
			// cCollegeCo
			// 
			this.cCollegeCo.ColumnMapping = System.Data.MappingType.Hidden;
			this.cCollegeCo.ColumnName = "所属院系";
			this.cCollegeCo.DataType = typeof(object);
			this.cCollegeCo.ReadOnly = true;
			// 
			// cCollegeNa
			// 
			this.cCollegeNa.ColumnName = "院系名称";
			this.cCollegeNa.DataType = typeof(object);
			this.cCollegeNa.ReadOnly = true;
			// 
			// cMemberName
			// 
			this.cMemberName.ColumnName = "负责人及主要合作者";
			this.cMemberName.DataType = typeof(object);
			this.cMemberName.ReadOnly = true;
			// 
			// cStartDate
			// 
			this.cStartDate.ColumnName = "立项日期";
			this.cStartDate.DataType = typeof(object);
			this.cStartDate.ReadOnly = true;
			// 
			// cPlanDate
			// 
			this.cPlanDate.ColumnName = "拟结项日期";
			this.cPlanDate.DataType = typeof(object);
			this.cPlanDate.ReadOnly = true;
			// 
			// cEndDate
			// 
			this.cEndDate.ColumnName = "结项日期";
			this.cEndDate.DataType = typeof(object);
			this.cEndDate.ReadOnly = true;
			// 
			// cStandardMoney
			// 
			this.cStandardMoney.ColumnName = "经费标准";
			this.cStandardMoney.DataType = typeof(object);
			this.cStandardMoney.ReadOnly = true;
			// 
			// cAlreadyMoney
			// 
			this.cAlreadyMoney.ColumnName = "已拨经费";
			this.cAlreadyMoney.DataType = typeof(object);
			this.cAlreadyMoney.ReadOnly = true;
			// 
			// cSurplusMoney
			// 
			this.cSurplusMoney.ColumnName = "剩余经费";
			this.cSurplusMoney.DataType = typeof(object);
			this.cSurplusMoney.ReadOnly = true;
			// 
			// cTel
			// 
			this.cTel.ColumnName = "联系电话";
			this.cTel.DataType = typeof(object);
			this.cTel.ReadOnly = true;
			// 
			// cEmail
			// 
			this.cEmail.ColumnName = "Email";
			this.cEmail.DataType = typeof(object);
			this.cEmail.ReadOnly = true;
			// 
			// cRemark
			// 
			this.cRemark.ColumnName = "备注";
			this.cRemark.DataType = typeof(object);
			this.cRemark.ReadOnly = true;
			// 
			// cSortPY
			// 
			this.cSortPY.ColumnMapping = System.Data.MappingType.Hidden;
			this.cSortPY.ColumnName = "分类拼音";
			this.cSortPY.DataType = typeof(object);
			this.cSortPY.ReadOnly = true;
			// 
			// cLevelPY
			// 
			this.cLevelPY.ColumnMapping = System.Data.MappingType.Hidden;
			this.cLevelPY.ColumnName = "级别拼音";
			this.cLevelPY.DataType = typeof(object);
			this.cLevelPY.ReadOnly = true;
			// 
			// cMainMember
			// 
			this.cMainMember.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMainMember.ColumnName = "负责人";
			this.cMainMember.DataType = typeof(object);
			this.cMainMember.ReadOnly = true;
			// 
			// cMember1
			// 
			this.cMember1.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMember1.ColumnName = "参研人1";
			this.cMember1.DataType = typeof(object);
			this.cMember1.ReadOnly = true;
			// 
			// cMember2
			// 
			this.cMember2.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMember2.ColumnName = "参研人2";
			this.cMember2.DataType = typeof(object);
			this.cMember2.ReadOnly = true;
			// 
			// cMember3
			// 
			this.cMember3.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMember3.ColumnName = "参研人3";
			this.cMember3.DataType = typeof(object);
			this.cMember3.ReadOnly = true;
			// 
			// cMember4
			// 
			this.cMember4.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMember4.ColumnName = "参研人4";
			this.cMember4.DataType = typeof(object);
			this.cMember4.ReadOnly = true;
			// 
			// cMember5
			// 
			this.cMember5.ColumnMapping = System.Data.MappingType.Hidden;
			this.cMember5.ColumnName = "参研人5";
			this.cMember5.DataType = typeof(object);
			this.cMember5.ReadOnly = true;
			// 
			// tableStyle
			// 
			this.tableStyle.DataGrid = this.dataGrid;
			this.tableStyle.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
																										 this.sTaskCo,
																										 this.sTaskNa,
																										 this.sCollege,
																										 this.sMemberNames,
																										 this.sStart,
																										 this.sPlan,
																										 this.sEnd,
																										 this.sStandard,
																										 this.sAlready,
																										 this.sSurplus,
																										 this.sTel,
																										 this.sEmail,
																										 this.sRemark});
			this.tableStyle.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.tableStyle.MappingName = "课题表";
			this.tableStyle.ReadOnly = true;
			this.tableStyle.RowHeaderWidth = 30;
			// 
			// sTaskCo
			// 
			this.sTaskCo.Format = "";
			this.sTaskCo.FormatInfo = null;
			this.sTaskCo.HeaderText = "课题编号";
			this.sTaskCo.MappingName = "课题编号";
			this.sTaskCo.NullText = "";
			this.sTaskCo.Width = 75;
			// 
			// sTaskNa
			// 
			this.sTaskNa.Format = "";
			this.sTaskNa.FormatInfo = null;
			this.sTaskNa.HeaderText = "课题名称";
			this.sTaskNa.MappingName = "课题名称";
			this.sTaskNa.NullText = "";
			this.sTaskNa.Width = 500;
			// 
			// sCollege
			// 
			this.sCollege.Format = "";
			this.sCollege.FormatInfo = null;
			this.sCollege.HeaderText = "院系名称";
			this.sCollege.MappingName = "院系名称";
			this.sCollege.NullText = "";
			this.sCollege.Width = 150;
			// 
			// sMemberNames
			// 
			this.sMemberNames.Format = "";
			this.sMemberNames.FormatInfo = null;
			this.sMemberNames.HeaderText = "负责人及主要合作者";
			this.sMemberNames.MappingName = "负责人及主要合作者";
			this.sMemberNames.NullText = "";
			this.sMemberNames.Width = 300;
			// 
			// sStart
			// 
			this.sStart.Format = "";
			this.sStart.FormatInfo = null;
			this.sStart.HeaderText = "立项日期";
			this.sStart.MappingName = "立项日期";
			this.sStart.NullText = "";
			this.sStart.Width = 120;
			// 
			// sPlan
			// 
			this.sPlan.Format = "";
			this.sPlan.FormatInfo = null;
			this.sPlan.HeaderText = "拟结项日期";
			this.sPlan.MappingName = "拟结项日期";
			this.sPlan.NullText = "";
			this.sPlan.Width = 120;
			// 
			// sEnd
			// 
			this.sEnd.Format = "";
			this.sEnd.FormatInfo = null;
			this.sEnd.HeaderText = "结项日期";
			this.sEnd.MappingName = "结项日期";
			this.sEnd.NullText = "";
			this.sEnd.Width = 120;
			// 
			// sStandard
			// 
			this.sStandard.Format = "";
			this.sStandard.FormatInfo = null;
			this.sStandard.HeaderText = "经费标准";
			this.sStandard.MappingName = "经费标准";
			this.sStandard.NullText = "";
			this.sStandard.Width = 120;
			// 
			// sAlready
			// 
			this.sAlready.Format = "";
			this.sAlready.FormatInfo = null;
			this.sAlready.HeaderText = "已拨经费";
			this.sAlready.MappingName = "已拨经费";
			this.sAlready.NullText = "";
			this.sAlready.Width = 120;
			// 
			// sSurplus
			// 
			this.sSurplus.Format = "";
			this.sSurplus.FormatInfo = null;
			this.sSurplus.HeaderText = "剩余经费";
			this.sSurplus.MappingName = "剩余经费";
			this.sSurplus.NullText = "";
			this.sSurplus.Width = 120;
			// 
			// sTel
			// 
			this.sTel.Format = "";
			this.sTel.FormatInfo = null;
			this.sTel.HeaderText = "联系电话";
			this.sTel.MappingName = "联系电话";
			this.sTel.NullText = "";
			this.sTel.Width = 150;
			// 
			// sEmail
			// 
			this.sEmail.Format = "";
			this.sEmail.FormatInfo = null;
			this.sEmail.HeaderText = "Email";
			this.sEmail.MappingName = "Email";
			this.sEmail.NullText = "";
			this.sEmail.Width = 150;
			// 
			// sRemark
			// 
			this.sRemark.Format = "";
			this.sRemark.FormatInfo = null;
			this.sRemark.HeaderText = "备注";
			this.sRemark.MappingName = "备注";
			this.sRemark.NullText = "";
			this.sRemark.Width = 150;
			// 
			// dataSet
			// 
			this.dataSet.DataSetName = "NewDataSet";
			this.dataSet.Locale = new System.Globalization.CultureInfo("zh-CN");
			this.dataSet.Tables.AddRange(new System.Data.DataTable[] {
																		 this.tTask});
			// 
			// sbpTitle
			// 
			this.sbpTitle.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
			this.sbpTitle.Text = "※ 长春大学教学研究课题管理系统 ※";
			this.sbpTitle.Width = 658;
			// 
			// sbpAuthor
			// 
			this.sbpAuthor.Text = "   *** 作者:杨取能、李光喜 ***";
			this.sbpAuthor.Width = 200;
			// 
			// sbpDate
			// 
			this.sbpDate.Text = "    年  月  日";
			// 
			// sbpTime
			// 
			this.sbpTime.Text = "  :";
			this.sbpTime.Width = 50;
			// 
			// timer_DateTime
			// 
			this.timer_DateTime.Interval = 1000;
			this.timer_DateTime.Tick += new System.EventHandler(this.timer_DateTime_Tick);
			// 
			// MainForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.AutoScroll = true;
			this.ClientSize = new System.Drawing.Size(1024, 719);
			this.Controls.Add(this.statusBar);
			this.Controls.Add(this.btnSearch);
			this.Controls.Add(this.btnUpdate);
			this.Controls.Add(this.btnDelete);
			this.Controls.Add(this.btnAdd);
			this.Controls.Add(this.btnEduce);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnAbout);
			this.Controls.Add(this.btnM_Manage);
			this.Controls.Add(this.btnC_Manage);
			this.Controls.Add(this.btnL_Manage);
			this.Controls.Add(this.btnS_Manage);
			this.Controls.Add(this.btnExit);
			this.Controls.Add(this.pictureBox1);
			this.Controls.Add(this.dataGrid);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.Name = "MainForm";
			this.Text = "长春大学教学研究课题管理系统";
			this.Load += new System.EventHandler(this.MainForm_Load);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.tTask)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpTitle)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpAuthor)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpDate)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpTime)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new MainForm());
		}

		private void MainForm_Load(object sender, System.EventArgs e)
		{
			this.ConnectToServer();
			this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
			this.timer_DateTime.Enabled = true;
			this.timer_DateTime_Tick(null, null);
		}

		/// <summary>
		/// 连接服务器。
		/// </summary>
		private void ConnectToServer()
		{
			ConnectForm connectForm = new ConnectForm();
			connectForm.SetConnectStr(this.connectStr);
			connectForm.ShowDialog();
			if(connectForm.Connection != null)
			{
				this.sqlConnection = connectForm.Connection;
				this.sqlCommand.Connection = this.sqlConnection;
				this.storedProcedure.Connection = this.sqlConnection;
				connectForm.GetConnectStr(ref this.connectStr);
			}
		}

		private void btnAdd_Click(object sender, System.EventArgs e)
		{
			this.AddUpdateTask(this.tTask.NewRow());
		}

		private void btnDelete_Click(object sender, System.EventArgs e)
		{
			DialogResult dialogResult = MessageBox.Show("是否确定删除该课题记录?", "系统提问", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
			if(dialogResult == DialogResult.Yes)
			{
				this.DeleteTask();

⌨️ 快捷键说明

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