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

📄 frmmain.cs

📁 学生类:Student 教师类:Teacher 主任:AdminTeacher 班主任:MasterTeacher 授课老师: PrelectTeacher 班级类:classTeam 班
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using DataAccess;
using BusinessRule;

namespace Forms
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		private System.Windows.Forms.StatusBar statusBar1;
		private System.Windows.Forms.StatusBarPanel statusBarPanel2;
		private System.Windows.Forms.StatusBarPanel statusBarPanel3;
		private System.Windows.Forms.StatusBarPanel statusBarPanel4;
		private System.Windows.Forms.MenuItem menuItem18;
		private System.Windows.Forms.MenuItem menuItem19;
		private System.Windows.Forms.MenuItem menuItem6;
		private System.Windows.Forms.MenuItem munTeacherInfo;
		private System.Windows.Forms.MenuItem mnuAddTeacher;
		private System.Windows.Forms.MenuItem mnuAddStudents;
		private System.Windows.Forms.MenuItem mnuClassInfo;
		private System.Windows.Forms.MenuItem mnuClassroomInfo;
		private System.Windows.Forms.MenuItem mnuClassroomUserInfo;
		private System.Windows.Forms.MenuItem mnuClassInfoSelect;
		private System.Windows.Forms.MenuItem mnuAddClassInfo;
		private System.Windows.Forms.MenuItem mnuAbout;
		private System.Windows.Forms.ToolBarButton tbrTeacherInfoSelect;
		private System.Windows.Forms.ToolBarButton tbrClassroomUserInfoSelect;
		private System.Windows.Forms.ToolBarButton tbrExit;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		//静态储存当前用户编号,无用户状态时为模拟教师编号
		public static int UserID= 10000;

		//Teacher作为通用引用,另三个用于实例化
		private Teacher teacher = null;
	
		private AdminTeacher Ateacher = null;
		private PrelectTeacher Pteacher = null;
		private MasterTeacher Mteacher = null;

		private System.Windows.Forms.StatusBarPanel sbrUserName;
		private System.Windows.Forms.ToolBarButton tbrLogin;
		private System.Windows.Forms.ToolBar tbMain;
		private System.Windows.Forms.MenuItem menuItem3;
		private System.Windows.Forms.MenuItem mnuSystem;
		private System.Windows.Forms.MenuItem mnuLogin;
		private System.Windows.Forms.MenuItem mnuExit;
		private System.Windows.Forms.MenuItem mnuTeacher;
		private System.Windows.Forms.MenuItem mnuTeaAFDInfo;
		private System.Windows.Forms.MenuItem mnuStuAFDInfo;
		private System.Windows.Forms.MenuItem mnuHelp;
		private System.Windows.Forms.MenuItem mnuChance;
		private System.Windows.Forms.MenuItem mnuCencel;
		private System.Windows.Forms.MenuItem menuItem4;
		private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.MenuItem mnuTeaChance;
		private System.Windows.Forms.MenuItem mnuAddTeaDuty;
		private System.Windows.Forms.MenuItem mnuTeaPelect;
		private System.Windows.Forms.MenuItem mnuAddTeaPelect;
		private System.Windows.Forms.MenuItem mnuStuInfoChance;
		private System.Windows.Forms.MenuItem mnuAddStuAFD;
		private System.Windows.Forms.MainMenu mnuMain;
		private System.Windows.Forms.ToolBarButton tbrAddStudent;
		private System.Windows.Forms.ToolBarButton tbrAboutUS;
		private System.Windows.Forms.MenuItem menuItem2;
	

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

			//
			// 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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
			this.mnuMain = new System.Windows.Forms.MainMenu();
			this.mnuSystem = new System.Windows.Forms.MenuItem();
			this.mnuLogin = new System.Windows.Forms.MenuItem();
			this.menuItem4 = new System.Windows.Forms.MenuItem();
			this.mnuChance = new System.Windows.Forms.MenuItem();
			this.mnuCencel = new System.Windows.Forms.MenuItem();
			this.menuItem5 = new System.Windows.Forms.MenuItem();
			this.mnuExit = new System.Windows.Forms.MenuItem();
			this.mnuTeacher = new System.Windows.Forms.MenuItem();
			this.munTeacherInfo = new System.Windows.Forms.MenuItem();
			this.mnuTeaAFDInfo = new System.Windows.Forms.MenuItem();
			this.mnuTeaPelect = new System.Windows.Forms.MenuItem();
			this.menuItem18 = new System.Windows.Forms.MenuItem();
			this.mnuAddTeacher = new System.Windows.Forms.MenuItem();
			this.mnuTeaChance = new System.Windows.Forms.MenuItem();
			this.mnuAddTeaPelect = new System.Windows.Forms.MenuItem();
			this.mnuAddTeaDuty = new System.Windows.Forms.MenuItem();
			this.mnuClassInfo = new System.Windows.Forms.MenuItem();
			this.mnuClassInfoSelect = new System.Windows.Forms.MenuItem();
			this.mnuAddClassInfo = new System.Windows.Forms.MenuItem();
			this.menuItem6 = new System.Windows.Forms.MenuItem();
			this.mnuClassroomInfo = new System.Windows.Forms.MenuItem();
			this.mnuClassroomUserInfo = new System.Windows.Forms.MenuItem();
			this.menuItem2 = new System.Windows.Forms.MenuItem();
			this.mnuAddStudents = new System.Windows.Forms.MenuItem();
			this.mnuStuInfoChance = new System.Windows.Forms.MenuItem();
			this.mnuStuAFDInfo = new System.Windows.Forms.MenuItem();
			this.mnuAddStuAFD = new System.Windows.Forms.MenuItem();
			this.mnuHelp = new System.Windows.Forms.MenuItem();
			this.mnuAbout = new System.Windows.Forms.MenuItem();
			this.menuItem19 = new System.Windows.Forms.MenuItem();
			this.menuItem3 = new System.Windows.Forms.MenuItem();
			this.tbMain = new System.Windows.Forms.ToolBar();
			this.tbrLogin = new System.Windows.Forms.ToolBarButton();
			this.tbrTeacherInfoSelect = new System.Windows.Forms.ToolBarButton();
			this.tbrAddStudent = new System.Windows.Forms.ToolBarButton();
			this.tbrClassroomUserInfoSelect = new System.Windows.Forms.ToolBarButton();
			this.tbrAboutUS = new System.Windows.Forms.ToolBarButton();
			this.tbrExit = new System.Windows.Forms.ToolBarButton();
			this.statusBar1 = new System.Windows.Forms.StatusBar();
			this.sbrUserName = new System.Windows.Forms.StatusBarPanel();
			this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
			this.statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
			this.statusBarPanel4 = new System.Windows.Forms.StatusBarPanel();
			((System.ComponentModel.ISupportInitialize)(this.sbrUserName)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel4)).BeginInit();
			this.SuspendLayout();
			// 
			// mnuMain
			// 
			this.mnuMain.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					this.mnuSystem,
																					this.mnuTeacher,
																					this.mnuClassInfo,
																					this.mnuHelp,
																					this.menuItem3});
			// 
			// mnuSystem
			// 
			this.mnuSystem.Index = 0;
			this.mnuSystem.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.mnuLogin,
																					  this.menuItem4,
																					  this.mnuChance,
																					  this.mnuCencel,
																					  this.menuItem5,
																					  this.mnuExit});
			this.mnuSystem.Text = "系统管理";
			// 
			// mnuLogin
			// 
			this.mnuLogin.Index = 0;
			this.mnuLogin.Text = "登录(&L)";
			this.mnuLogin.Click += new System.EventHandler(this.mnuLogin_Click);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 1;
			this.menuItem4.Text = "-";
			// 
			// mnuChance
			// 
			this.mnuChance.Index = 2;
			this.mnuChance.Text = "修改密码(&C)";
			this.mnuChance.Click += new System.EventHandler(this.mnuChance_Click);
			// 
			// mnuCencel
			// 
			this.mnuCencel.Index = 3;
			this.mnuCencel.Text = "注销(&Z)";
			this.mnuCencel.Click += new System.EventHandler(this.mnuCencel_Click);
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 4;
			this.menuItem5.Text = "-";
			// 
			// mnuExit
			// 
			this.mnuExit.Index = 5;
			this.mnuExit.Text = "退出(&E)";
			this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);
			// 
			// mnuTeacher
			// 
			this.mnuTeacher.Enabled = false;
			this.mnuTeacher.Index = 1;
			this.mnuTeacher.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.munTeacherInfo,
																					   this.mnuTeaAFDInfo,
																					   this.mnuTeaPelect,
																					   this.menuItem18,
																					   this.mnuAddTeacher,
																					   this.mnuTeaChance,
																					   this.mnuAddTeaPelect,
																					   this.mnuAddTeaDuty});
			this.mnuTeacher.Text = "教师管理(&T)";
			// 
			// munTeacherInfo
			// 
			this.munTeacherInfo.Index = 0;
			this.munTeacherInfo.Text = "教师基本信息查询";
			this.munTeacherInfo.Click += new System.EventHandler(this.munTeacherInfo_Click);
			// 
			// mnuTeaAFDInfo
			// 
			this.mnuTeaAFDInfo.Index = 1;
			this.mnuTeaAFDInfo.Text = "教师缺勤信息查询";
			// 
			// mnuTeaPelect
			// 
			this.mnuTeaPelect.Index = 2;
			this.mnuTeaPelect.Text = "教师授课信息查询";
			// 
			// menuItem18
			// 
			this.menuItem18.Index = 3;
			this.menuItem18.Text = "-";
			// 
			// mnuAddTeacher
			// 
			this.mnuAddTeacher.Index = 4;
			this.mnuAddTeacher.Text = "增加教师信息";
			this.mnuAddTeacher.Click += new System.EventHandler(this.mnuAddTeacher_Click);
			// 
			// mnuTeaChance
			// 
			this.mnuTeaChance.Index = 5;
			this.mnuTeaChance.Text = "修改教师信息";
			// 
			// mnuAddTeaPelect
			// 
			this.mnuAddTeaPelect.Index = 6;
			this.mnuAddTeaPelect.Text = "添加教师授课信息";
			// 
			// mnuAddTeaDuty
			// 
			this.mnuAddTeaDuty.Index = 7;
			this.mnuAddTeaDuty.Text = "添加教师缺勤信息";
			// 
			// mnuClassInfo
			// 
			this.mnuClassInfo.Enabled = false;
			this.mnuClassInfo.Index = 2;
			this.mnuClassInfo.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						 this.mnuClassInfoSelect,
																						 this.mnuAddClassInfo,
																						 this.menuItem6,
																						 this.mnuClassroomInfo,
																						 this.mnuClassroomUserInfo,
																						 this.menuItem2,
																						 this.mnuAddStudents,
																						 this.mnuStuInfoChance,
																						 this.mnuStuAFDInfo,
																						 this.mnuAddStuAFD});
			this.mnuClassInfo.Text = "班级\\学员管理(&C)";
			// 
			// mnuClassInfoSelect
			// 
			this.mnuClassInfoSelect.Index = 0;
			this.mnuClassInfoSelect.Text = "查询班级信息";
			this.mnuClassInfoSelect.Click += new System.EventHandler(this.mnuClassInfoSelect_Click);
			// 
			// mnuAddClassInfo
			// 
			this.mnuAddClassInfo.Index = 1;
			this.mnuAddClassInfo.Text = "增加班级信息";
			// 
			// menuItem6
			// 
			this.menuItem6.Index = 2;
			this.menuItem6.Text = "-";
			// 
			// mnuClassroomInfo
			// 
			this.mnuClassroomInfo.Index = 3;
			this.mnuClassroomInfo.Text = "教室基本信息";
			this.mnuClassroomInfo.Click += new System.EventHandler(this.mnuClassroomInfo_Click);
			// 
			// mnuClassroomUserInfo
			// 
			this.mnuClassroomUserInfo.Index = 4;
			this.mnuClassroomUserInfo.Text = "教室使用信息";
			this.mnuClassroomUserInfo.Click += new System.EventHandler(this.mnuClassroomUserInfo_Click);
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 5;
			this.menuItem2.Text = "-";
			// 
			// mnuAddStudents
			// 
			this.mnuAddStudents.Index = 6;
			this.mnuAddStudents.Text = "添加学生信息";
			this.mnuAddStudents.Click += new System.EventHandler(this.mnuAddStudents_Click);

⌨️ 快捷键说明

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