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

📄 frmmain.cs

📁 一个经典的东东
💻 CS
📖 第 1 页 / 共 5 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using Business;
using System.Threading;

namespace GUI
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		private System.Windows.Forms.MainMenu mainMenu;
		private System.Windows.Forms.MenuItem menuSystem;
		private System.Windows.Forms.MenuItem menuExit;
		private System.Windows.Forms.MenuItem menuHelp;
		private System.Windows.Forms.MenuItem menuAbout;
		private System.Windows.Forms.GroupBox gbBrowerObject;
		private System.Windows.Forms.Panel panelBrowerObject;
		private System.Windows.Forms.ToolBar toolBar;
		private System.Windows.Forms.StatusBar statusBar;
		private System.Windows.Forms.TabControl tabControlObject;
		private System.Windows.Forms.TabPage tabPageClass;
		private System.Windows.Forms.TabPage tabPageCourse;
		private System.Windows.Forms.TabPage tabPageStudent;
		private System.Windows.Forms.TabPage tabPageSubject;
		private System.Windows.Forms.GroupBox gbSystem;
		private System.Windows.Forms.TextBox txtSystem;
		private System.Windows.Forms.TabControl tabControlDetails;
		private System.Windows.Forms.TabPage tabCourseDetails;
		private System.Windows.Forms.TabPage tabStudentDetails;
		private System.Windows.Forms.TabPage tabSubjectDetails;
		private System.Windows.Forms.TreeView treeViewClass;
		private System.Windows.Forms.GroupBox gbClass;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.Label labelClassID;
		private System.Windows.Forms.TextBox txtClassID;
		private System.Windows.Forms.Label labelClassName;
		private System.Windows.Forms.TextBox txtClassName;
		private System.Windows.Forms.Label labelEntranceDate;
		private System.Windows.Forms.Label labelRemark;
		private System.Windows.Forms.TextBox txtRemark;
		private System.Windows.Forms.Panel panelDetails;
		private System.Windows.Forms.TabPage tabClassDetails;
		private System.Windows.Forms.LinkLabel linkLabelAddClass;
		private System.Windows.Forms.LinkLabel linkLabelDelClass;
		private System.Windows.Forms.LinkLabel linkLableUpdateClass;
		private System.Windows.Forms.ListView listViewClass;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.DateTimePicker dtpEntranceDate;
		private System.Windows.Forms.ImageList imageListtreeview;
		private System.Windows.Forms.StatusBarPanel statusBarSystemInfo;
		private System.Windows.Forms.StatusBarPanel Tab;
		private System.Windows.Forms.StatusBarPanel statusBarTime;
		private System.Windows.Forms.Timer timerStatuBar;
		private System.Windows.Forms.TreeView treeViewCourse;
		private System.Windows.Forms.ColumnHeader columnHeaderClassID;
		private System.Windows.Forms.ColumnHeader columnHeaderClassName;
		private System.Windows.Forms.ColumnHeader columnHeaderClassEntranceDate;
		private System.Windows.Forms.ColumnHeader columnHeaderRemark;
		private System.Windows.Forms.ColumnHeader columnHeaderCourseID;
		private System.Windows.Forms.ColumnHeader columnHeaderCourseClassName;
		private System.Windows.Forms.ColumnHeader columnHeaderCourseSubject;
		private System.Windows.Forms.ColumnHeader columnHeaderbeginDate;
		private System.Windows.Forms.ColumnHeader columnHeaderfinishDate;
		private System.Windows.Forms.ColumnHeader columnHeaderCourseRemark;
		private System.Windows.Forms.ListView listViewCourse;
		private System.Windows.Forms.ComboBox comboBoxCourseClassName;
		private System.Windows.Forms.Label labelCourseClassName;
		private System.Windows.Forms.Label labelCourseSubjectName;
		private System.Windows.Forms.ComboBox comboBoxCourseSubjectName;
		private System.Windows.Forms.Label labelCourseID;
		private System.Windows.Forms.GroupBox gbCourse;
		private System.Windows.Forms.TextBox txtCourseID;
		private System.Windows.Forms.DateTimePicker dateTimePickerOpenCourse;
		private System.Windows.Forms.Label labelOpenCourse;
		private System.Windows.Forms.Label labelfinishCourse;
		private System.Windows.Forms.DateTimePicker dateTimePickerfinishCourse;
		private System.Windows.Forms.Label labelCourseRemark;
		private System.Windows.Forms.TextBox txtCourseReMark;
		private System.Windows.Forms.TreeView treeViewCourseSubject;
		//定义对表course操作的类
		private CourseOperate courseoperate;
		//定义对表class操作的类
		private ClassOperate classoperate;
		private System.Windows.Forms.LinkLabel linkLabelAddCourse;
		private System.Windows.Forms.LinkLabel linkLabelDelCourse;
		private System.Windows.Forms.LinkLabel linkLabelUpdateCourse;
		private System.Windows.Forms.LinkLabel linkLabelClearCourse;
		private System.Windows.Forms.LinkLabel linkLabelClearClass;
		private System.Windows.Forms.ImageList imgTabControl;
		private System.Windows.Forms.TreeView treeViewStudentClass;
		private System.Windows.Forms.ListView listViewStudent;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentID;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentNO;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentName;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentSex;
		private System.Windows.Forms.ColumnHeader columnHeaderBirthday;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentClass;
		private System.Windows.Forms.ColumnHeader columnHeaderStudentRemark;
		private System.Windows.Forms.GroupBox gbStudent;
		//定义对表subject操作的类
		private SubjectOperate subjectoperate;
		private System.Windows.Forms.Label labelStudentID;
		private System.Windows.Forms.Label labelStudentNO;
		private System.Windows.Forms.Label labelStudentName;
		private System.Windows.Forms.Label labelSex;
		private System.Windows.Forms.Label labelBirthday;
		private System.Windows.Forms.Label labelStudentClassName;
		private System.Windows.Forms.Label labelStudentRemark;
		private System.Windows.Forms.TextBox txtStudentID;
		private System.Windows.Forms.TextBox txtStudentNO;
		private System.Windows.Forms.TextBox txtStudentName;
		private System.Windows.Forms.ComboBox cbmStudentSex;
		private System.Windows.Forms.DateTimePicker dtpBirthday;
		private System.Windows.Forms.ComboBox cbmStudentClass;
		private System.Windows.Forms.TextBox txtStudentRemark;
		private System.Windows.Forms.LinkLabel linkLabelAddStudent;
		private System.Windows.Forms.LinkLabel linkLabelUpdateStudent;
		private System.Windows.Forms.LinkLabel linkLabelDelStudent;
		private System.Windows.Forms.LinkLabel linkLabelClearStudent;
		private System.Windows.Forms.TabPage tabPageScore;
		private System.Windows.Forms.TabPage tabScoreDetails;
		private System.Windows.Forms.TreeView treeViewSubject;
		private System.Windows.Forms.ColumnHeader columnHeaderSubjectID;
		private System.Windows.Forms.ColumnHeader columnHeaderSubjectName;
		private System.Windows.Forms.ColumnHeader columnHeaderSubjectRemark;
		private System.Windows.Forms.ListView listViewSubject;
		private System.Windows.Forms.Label labelSubjectID;
		private System.Windows.Forms.TextBox txtSubjectID;
		private System.Windows.Forms.Label labelSubjectName;
		private System.Windows.Forms.Label labelSubjectRemark;
		private System.Windows.Forms.GroupBox gbSubject;
		private System.Windows.Forms.TextBox txtSubjectRemark;
		private System.Windows.Forms.LinkLabel linkLabelClearSubject;
		private System.Windows.Forms.LinkLabel linkLabelUpdateSubject;
		private System.Windows.Forms.LinkLabel linkLabelDelSubject;
		private System.Windows.Forms.LinkLabel linkLabelAddSubject;
		private System.Windows.Forms.TextBox txtSubjectName;
		private System.Windows.Forms.TreeView treeViewScoreClass;
		private System.Windows.Forms.ListView listViewScore;
		private System.Windows.Forms.ColumnHeader columnHeaderScoreStudentName;
		private System.Windows.Forms.ColumnHeader columnHeaderScoreSubjectName;
		private System.Windows.Forms.ColumnHeader columnHeaderScore;
		private System.Windows.Forms.ColumnHeader columnHeaderScoreID;
		private System.Windows.Forms.ListBox listBoxScoreStudentName;
		//定义对表student操作的类
		private StudentOperate studentoperate;
		private System.Windows.Forms.Label labelScoreId;
		private System.Windows.Forms.TextBox txtScoreId;
		private System.Windows.Forms.Label labelScoreStudentName;
		private System.Windows.Forms.ComboBox cmbScoreStudentName;
		private System.Windows.Forms.Label labelScoreSubjectName;
		private System.Windows.Forms.ComboBox cmbScoreSubjectName;
		private System.Windows.Forms.Label labelScore;
		private System.Windows.Forms.GroupBox gbScore;
		private System.Windows.Forms.GroupBox gbDetail;
		private System.Windows.Forms.TextBox txtScore;
		private System.Windows.Forms.LinkLabel linkLabelClearScore;
		private System.Windows.Forms.LinkLabel linkLabelUpdateScore;
		private System.Windows.Forms.LinkLabel linkLabelDelScore;
		private System.Windows.Forms.LinkLabel linkLabelAddScore;
		private System.Windows.Forms.ToolTip toolTip1;
		private System.Windows.Forms.ToolBarButton toolBarButtonshuffle;
		private System.Windows.Forms.ToolBarButton toolBarButtonBlankOne;
		private System.Windows.Forms.ToolBarButton toolBarButtonQuit;
		private System.Windows.Forms.ToolBarButton toolBarButtonBlankTwo;
		private System.Windows.Forms.ToolBarButton toolBarButtonSelect;
		private System.Windows.Forms.HelpProvider hlpStuManager;
		//定义对表Score操作的类
		private ScoreOperate scoreoperate;

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

			//实例化对表class操作的类
			classoperate=new ClassOperate();
			//实例化对表course操作的类
			courseoperate=new CourseOperate();
			//实例化对表subject操作的类
			subjectoperate=new SubjectOperate();
			//实例化对表student操作的类
			studentoperate=new StudentOperate();
			//实例化对表score操作的类
			scoreoperate=new ScoreOperate();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <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.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
			this.mainMenu = new System.Windows.Forms.MainMenu();
			this.menuSystem = new System.Windows.Forms.MenuItem();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.menuExit = new System.Windows.Forms.MenuItem();
			this.menuHelp = new System.Windows.Forms.MenuItem();
			this.menuAbout = new System.Windows.Forms.MenuItem();
			this.gbBrowerObject = new System.Windows.Forms.GroupBox();
			this.tabControlObject = new System.Windows.Forms.TabControl();
			this.tabPageClass = new System.Windows.Forms.TabPage();
			this.treeViewClass = new System.Windows.Forms.TreeView();
			this.imageListtreeview = new System.Windows.Forms.ImageList(this.components);
			this.tabPageCourse = new System.Windows.Forms.TabPage();
			this.treeViewCourseSubject = new System.Windows.Forms.TreeView();
			this.treeViewCourse = new System.Windows.Forms.TreeView();
			this.tabPageStudent = new System.Windows.Forms.TabPage();
			this.treeViewStudentClass = new System.Windows.Forms.TreeView();
			this.tabPageSubject = new System.Windows.Forms.TabPage();
			this.treeViewSubject = new System.Windows.Forms.TreeView();
			this.tabPageScore = new System.Windows.Forms.TabPage();
			this.treeViewScoreClass = new System.Windows.Forms.TreeView();
			this.listBoxScoreStudentName = new System.Windows.Forms.ListBox();
			this.imgTabControl = new System.Windows.Forms.ImageList(this.components);
			this.panelBrowerObject = new System.Windows.Forms.Panel();
			this.toolBar = new System.Windows.Forms.ToolBar();
			this.toolBarButtonshuffle = new System.Windows.Forms.ToolBarButton();
			this.toolBarButtonBlankOne = new System.Windows.Forms.ToolBarButton();
			this.toolBarButtonQuit = new System.Windows.Forms.ToolBarButton();
			this.toolBarButtonBlankTwo = new System.Windows.Forms.ToolBarButton();
			this.toolBarButtonSelect = new System.Windows.Forms.ToolBarButton();
			this.statusBar = new System.Windows.Forms.StatusBar();
			this.statusBarSystemInfo = new System.Windows.Forms.StatusBarPanel();
			this.Tab = new System.Windows.Forms.StatusBarPanel();
			this.statusBarTime = new System.Windows.Forms.StatusBarPanel();
			this.panelDetails = new System.Windows.Forms.Panel();
			this.gbDetail = new System.Windows.Forms.GroupBox();
			this.tabControlDetails = new System.Windows.Forms.TabControl();
			this.tabClassDetails = new System.Windows.Forms.TabPage();
			this.listViewClass = new System.Windows.Forms.ListView();
			this.columnHeaderClassID = new System.Windows.Forms.ColumnHeader();
			this.columnHeaderClassName = new System.Windows.Forms.ColumnHeader();
			this.columnHeaderClassEntranceDate = new System.Windows.Forms.ColumnHeader();
			this.columnHeaderRemark = new System.Windows.Forms.ColumnHeader();
			this.gbClass = new System.Windows.Forms.GroupBox();
			this.linkLabelClearClass = new System.Windows.Forms.LinkLabel();
			this.dtpEntranceDate = new System.Windows.Forms.DateTimePicker();
			this.linkLableUpdateClass = new System.Windows.Forms.LinkLabel();
			this.linkLabelDelClass = new System.Windows.Forms.LinkLabel();
			this.linkLabelAddClass = new System.Windows.Forms.LinkLabel();
			this.txtRemark = new System.Windows.Forms.TextBox();
			this.labelRemark = new System.Windows.Forms.Label();
			this.labelEntranceDate = new System.Windows.Forms.Label();
			this.txtClassName = new System.Windows.Forms.TextBox();
			this.labelClassName = new System.Windows.Forms.Label();
			this.txtClassID = new System.Windows.Forms.TextBox();
			this.labelClassID = new System.Windows.Forms.Label();
			this.tabCourseDetails = new System.Windows.Forms.TabPage();
			this.gbCourse = new System.Windows.Forms.GroupBox();
			this.linkLabelClearCourse = new System.Windows.Forms.LinkLabel();

⌨️ 快捷键说明

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