学生信息管理系统实训报告(12页).doc
-学生信息管理系统实训报告-第 12 页实训报告项目名称: 学生信息管理系统 系部:班级:姓名: 学号:指导教师:目录第一部分、电子计算器一、实训题目与要求-11、用户需求-22、功能要求-3二、设计实训题目功能-33、总体设计-34、界面图像-45、程序代码-9第二部分、学生成绩管理系统1、实训题目与要求-92、程序界面设计及代码-16第三部分、实训总结-17电子计算器实训报告第一部分、实训题目与要求1、用户需求用户可以通过在程序所提供界面上的操作来完成生活中一些简单的计算。2、 系统功能要求可以对十进制数字进行+、-、*、/、n次方、对数等简单运算。第二部分、设计实训题目功能(1) 模块设计(2) 程序模块图及代码设计 namespace Counter public partial class Form1 : Form public Form1() InitializeComponent() double pred ; bool predestined = true; bool KJClick = false; string strOne="" string strEnd="" int sign=0; double dblOne; double dblEnd; #region public 0到9的代码 /所有0到9中要调用的代码public void Num_Evaluation(string strC) if (KJClick = true) KJClick = false; txtBox.Text = "0" string strY = "" if (this.txtBox.Text = "0") this.txtBox.Text = strC; else strY = txtBox.Text; strY = strY + strC; txtBox.Text = strY; predestined = true; pred = 0; /txtBox.Focus(); /0 private void but0_Click(object sender, EventArgs e) Num_Evaluation("0"); /1 private void but1_Click(object sender, EventArgs e) Num_Evaluation("1"); /2 private void but2_Click(object sender, EventArgs e) Num_Evaluation("2"); /3 private void but3_Click(object sender, EventArgs e) Num_Evaluation("3"); /4 private void but4_Click(object sender, EventArgs e) Num_Evaluation("4"); /5 private void but5_Click(object sender, EventArgs e) Num_Evaluation("5"); /6 private void but6_Click(object sender, EventArgs e) Num_Evaluation("6"); /7 private void but7_Click(object sender, EventArgs e) Num_Evaluation("7"); /8 private void but8_Click(object sender, EventArgs e) Num_Evaluation("8"); /9 private void but9_Click(object sender, EventArgs e) Num_Evaluation("9"); #endregion /小数点的代码 private void butDian_Click(object sender, EventArgs e) if (KJClick = true) KJClick = false; txtBox.Text = "0" string strtxt = txtBox.Text; if (strtxt = "0") return; bool dian = false; for (int i = 0; i < strtxt.Length; i+) if (strtxti = '.') dian = true; return; if (dian = false) Num_Evaluation("."); /+/-中的代码 private void butZF_Click(object sender, EventArgs e) /if(KJClick=true) / KJClick = false; / return; string strtxt = txtBox.Text; if (strtxt = "0") return; if (strtxt0 = '-')/这里有个错误,有可能会超过范围 txtBox.Text = strtxt.Substring(1); else txtBox.Text = "-" + strtxt; /1/x中的代码 private void butDao_Click(object sender, EventArgs e) string strtxt = txtBox.Text; if (strtxt = "0") return; double dblNum = double.Parse(strtxt); /double dblNum = System.Convert.ToDouble();效率没有上面的高 dblNum = 1 / dblNum; txtBox.Text = dblNum.ToString(); KJClick = true; /%中的代码 private void butBFH_Click(object sender, EventArgs e) txtBox.Text = "0" /spart中的代码 private void butsprt_Click(object sender, EventArgs e) string strtxt = txtBox.Text; if(strtxt="0") return; double dblNum = double.Parse(strtxt); dblNum = Math.Sqrt(dblNum); txtBox.Text = dblNum.ToString(); KJClick = true; #region public 加减乘除的代码 /+号中的代码 private void butJia_Click(object sender, EventArgs e) sign = 1; strOne = txtBox.Text; KJClick = true; /NumSwap(); /-号中的代码 private void butJian_Click(object sender, EventArgs e) sign = 2; strOne = txtBox.Text; KJClick = true; /*号中的代码 private void butCheng_Click(object sender, EventArgs e) sign = 3; strOne = txtBox.Text; KJClick = true; /除号中的代码 private void butChu_Click(object sender, EventArgs e) sign = 4; strOne = txtBox.Text; KJClick = true; /=号中的代码 private void butDY_Click(object sender, EventArgs e) strEnd = txtBox.Text; if (strOne = "" | strEnd = "") return; if (predestined) dblOne = double.Parse(strOne); dblEnd = double.Parse(strEnd); pred = dblEnd; switch(sign) case 1: double dblNum = dblOne + pred; txtBox.Text = dblNum.ToString(); dblOne = double.Parse(txtBox.Text); predestined = false; break; case 2: double dblNum = dblOne - pred; txtBox.Text = dblNum.ToString(); dblOne = double.Parse(txtBox.Text); predestined = false; break; case 3: double dblNum = dblOne * pred; txtBox.Text = dblNum.ToString(); dblOne = double.Parse(txtBox.Text); predestined = false; break; case 4: double dblNum = dblOne / pred; txtBox.Text = dblNum.ToString(); dblOne = double.Parse(txtBox.Text); predestined = false; /dblOne=屏幕上得数; / dblend不变; break; default: return; /sign = 0; KJClick = true; #endregion学生成绩管理系统实训报告第一部分、实训题目与要求1、 通过对学校来进行学生成绩管理系统,使此系统能够完成学生成绩的查询,学生档案管理,基本信息的存储、查询、检索。2、 系统要求:老师和学生要及时给学校提供相关的信息,以便学校方便对成绩系统进行修改,当学生信息有变化时,系统信息要及时变更,以便学生能正常上课,还有对学生信息的安全性及完整性,安全性的要求要鉴别老师及学生信息的信息是否准确,如果是正确信息要对老师及学生的信息进行保护。而完整性就是确定安全性的同时不容许信息缺漏,使各种信息必要时联系起来,相同信息的重复。第二部分、设计实训的题目功能(1) 程序界面及代码:(2)学生成绩管理系统部分代码如下: namespace 学生成绩管理系统 partial class Frmmain / <summary> / Required designer variable. / </summary> private System.ComponentModel.IContainer components = null; / <summary> / Clean up any resources being used. / </summary> / <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) if (disposing && (components != null) components.Dispose(); base.Dispose(disposing); #region Windows Form Designer generated code this.panel1 = new System.Windows.Forms.Panel(); this.学生档案管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.系部档案管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSplitButton4 = new System.Windows.Forms.ToolStripSplitButton(); this.专业信息管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.班级信息管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.教师信息管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.课程信息管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSplitButton5 = new System.Windows.Forms.ToolStripSplitButton(); this.关于我们ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.关于系统ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.panel2 = new System.Windows.Forms.Panel(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); / panel1 this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Controls.Add(this.toolStrip1); this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1" this.panel1.Size = new System.Drawing.Size(936, 40); this.panel1.TabIndex = 0; / toolStrip1 this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Fill; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem this.toolStripSplitButton1, this.toolStripSplitButton2, this.toolStripSplitButton3, this.toolStripSplitButton4, this.toolStripSplitButton5, this.toolStripButton1); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1" this.toolStrip1.Size = new System.Drawing.Size(936, 40); this.toolStrip1.TabIndex = 0; this.toolStrip1.Text = "toolStrip1" / toolStripSplitButton1 this.toolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem this.重新登陆ToolStripMenuItem, this.修改密码ToolStripMenuItem, this.备份与还原ToolStripMenuItem, this.申请权限ToolStripMenuItem); this.toolStripSplitButton1.Image = (System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image"); this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripSplitButton1.Name = "toolStripSplitButton1" this.toolStripSplitButton1.Size = new System.Drawing.Size(71, 37); this.toolStripSplitButton1.Text = "系统信息" / 重新登陆ToolStripMenuItem this.重新登陆ToolStripMenuItem.Name = "重新登陆ToolStripMenuItem" this.重新登陆ToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.重新登陆ToolStripMenuItem.Text = "重新登陆" this.重新登陆ToolStripMenuItem.Click += new System.EventHandler(this.重新登陆ToolStripMenuItem_Click); / 修改密码ToolStripMenuItem this.修改密码ToolStripMenuItem.Name = "修改密码ToolStripMenuItem" this.修改密码ToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.修改密码ToolStripMenuItem.Text = "修改密码" this.修改密码ToolStripMenuItem.Click += new System.EventHandler(this.修改密码ToolStripMenuItem_Click); / 备份与还原ToolStripMenuItem this.备份与还原ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem this.备份系统ToolStripMenuItem, this.还原系统ToolStripMenuItem); this.备份与还原ToolStripMenuItem.Name = "备份与还原ToolStripMenuItem" this.备份与还原ToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.备份与还原ToolStripMenuItem.Text = "备份与还原" / 备份系统ToolStripMenuItem this.备份系统ToolStripMenuItem.Name = "备份系统ToolStripMenuItem" this.备份系统ToolStripMenuItem.Size = new System.Drawing.Size(122, 22); this.备份系统ToolStripMenuItem.Text = "备份系统" this.备份系统ToolStripMenuItem.Click += new System.EventHandler(this.备份系统ToolStripMenuItem_Click); / 还原系统ToolStripMenuItem this.还原系统ToolStripMenuItem.Name = "还原系统ToolStripMenuItem" this.还原系统ToolStripMenuItem.Size = new System.Drawing.Size(122, 22); this.还原系统ToolStripMenuItem.Text = "还原系统" this.还原系统ToolStripMenuItem.Click += new System.EventHandler(this.还原系统ToolStripMenuItem_Click); / 申请权限ToolStripMenuItem this.申请权限ToolStripMenuItem.Name = "申请权限ToolStripMenuItem" this.申请权限ToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.申请权限ToolStripMenuItem.Text = "申请更多的权限" this.申请权限ToolStripMenuItem.Click += new System.EventHandler(this.申请权限 / 成绩管理ToolStripMenuItem this.成绩管理ToolStripMenuItem.Name = "成绩管理ToolStripMenuItem" this.成绩管理ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.成绩管理ToolStripMenuItem.Text = "成绩管理" this.成绩管理ToolStripMenuItem.Click += new System.EventHandler(this.成绩管理ToolStripMenuItem_Click); / 成绩查询ToolStripMenuItem this.成绩查询ToolStripMenuItem.Name = "成绩查询ToolStripMenuItem" this.成绩查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.成绩查询ToolStripMenuItem.Text = "成绩查询" this.成绩查询ToolStripMenuItem.Click += new System.EventHandler(this.成绩查询ToolStripMenuItem_Click); / 信息查询ToolStripMenuItem this.信息查询ToolStripMenuItem.Name = "信息查询ToolStripMenuItem" this.信息查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.信息查询ToolStripMenuItem.Text = "信息查询" this.信息查询ToolStripMenuItem.Click += new System.EventHandler(this.信息查询 / 学生档案管理ToolStripMenuItem this.学生档案管理ToolStripMenuItem.Name = "学生档案管理ToolStripMenuItem" this.学生档案管理ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.学生档案管理ToolStripMenuItem.Text = "学生档案管理" / toolStripSplitButton4 this.toolStripSplitButton4.DisplayStyle = System.Window