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

📄 scoreanalyse.cs

📁 c# + sql2000 学生管理系统
💻 CS
📖 第 1 页 / 共 4 页
字号:
            "Gray"});
            this.BorderColor.Location = new System.Drawing.Point(102, 96);
            this.BorderColor.Name = "BorderColor";
            this.BorderColor.Size = new System.Drawing.Size(88, 20);
            this.BorderColor.TabIndex = 4;
            this.BorderColor.SelectedIndexChanged += new System.EventHandler(this.BorderColor_SelectedIndexChanged);
            // 
            // HatchStyle
            // 
            this.HatchStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.HatchStyle.Location = new System.Drawing.Point(102, 72);
            this.HatchStyle.Name = "HatchStyle";
            this.HatchStyle.Size = new System.Drawing.Size(88, 20);
            this.HatchStyle.TabIndex = 3;
            this.HatchStyle.SelectedIndexChanged += new System.EventHandler(this.HatchStyle_SelectedIndexChanged);
            // 
            // Gradient
            // 
            this.Gradient.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.Gradient.Location = new System.Drawing.Point(102, 48);
            this.Gradient.Name = "Gradient";
            this.Gradient.Size = new System.Drawing.Size(88, 20);
            this.Gradient.TabIndex = 2;
            this.Gradient.SelectedIndexChanged += new System.EventHandler(this.Gradient_SelectedIndexChanged);
            // 
            // ForeColorCom
            // 
            this.ForeColorCom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.ForeColorCom.Items.AddRange(new object[] {
            "White",
            "Blue",
            "Yellow",
            "Red",
            "Green",
            "Gray"});
            this.ForeColorCom.Location = new System.Drawing.Point(102, 24);
            this.ForeColorCom.Name = "ForeColorCom";
            this.ForeColorCom.Size = new System.Drawing.Size(88, 20);
            this.ForeColorCom.TabIndex = 1;
            this.ForeColorCom.SelectedIndexChanged += new System.EventHandler(this.ForeColorCom_SelectedIndexChanged);
            // 
            // BackColorCom
            // 
            this.BackColorCom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.BackColorCom.Items.AddRange(new object[] {
            "White",
            "Blue",
            "Yellow",
            "Red",
            "Green",
            "Gray"});
            this.BackColorCom.Location = new System.Drawing.Point(102, 0);
            this.BackColorCom.Name = "BackColorCom";
            this.BackColorCom.Size = new System.Drawing.Size(88, 20);
            this.BackColorCom.TabIndex = 0;
            this.BackColorCom.SelectedIndexChanged += new System.EventHandler(this.BackColorCom_SelectedIndexChanged);
            // 
            // label5
            // 
            this.label5.ForeColor = System.Drawing.Color.DarkGreen;
            this.label5.Location = new System.Drawing.Point(-2, 144);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(100, 23);
            this.label5.TabIndex = 8;
            this.label5.Text = "Border Style:";
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label8
            // 
            this.label8.Location = new System.Drawing.Point(64, 472);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(100, 23);
            this.label8.TabIndex = 7;
            this.label8.Text = "Shadow Offset:";
            // 
            // label7
            // 
            this.label7.Location = new System.Drawing.Point(64, 449);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(100, 23);
            this.label7.TabIndex = 6;
            this.label7.Text = "Border Style:";
            // 
            // label6
            // 
            this.label6.Location = new System.Drawing.Point(64, 403);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(100, 23);
            this.label6.TabIndex = 5;
            this.label6.Text = "Border Size:";
            // 
            // label9
            // 
            this.label9.Location = new System.Drawing.Point(64, 380);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(100, 23);
            this.label9.TabIndex = 4;
            this.label9.Text = "Border Color:";
            // 
            // label10
            // 
            this.label10.Location = new System.Drawing.Point(64, 357);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(100, 23);
            this.label10.TabIndex = 3;
            this.label10.Text = "Hatch Style:";
            // 
            // label12
            // 
            this.label12.Location = new System.Drawing.Point(64, 334);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(100, 23);
            this.label12.TabIndex = 2;
            this.label12.Text = "Gradient:";
            // 
            // label13
            // 
            this.label13.ForeColor = System.Drawing.Color.DarkGreen;
            this.label13.Location = new System.Drawing.Point(0, 24);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(100, 23);
            this.label13.TabIndex = 1;
            this.label13.Text = "Fore Color:";
            this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label14
            // 
            this.label14.ForeColor = System.Drawing.Color.DarkGreen;
            this.label14.Location = new System.Drawing.Point(-2, 120);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(100, 23);
            this.label14.TabIndex = 6;
            this.label14.Text = "Border Size:";
            this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label15
            // 
            this.label15.ForeColor = System.Drawing.Color.DarkGreen;
            this.label15.Location = new System.Drawing.Point(0, -1);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(100, 23);
            this.label15.TabIndex = 0;
            this.label15.Text = "Back Color:";
            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label16
            // 
            this.label16.ForeColor = System.Drawing.Color.DarkGreen;
            this.label16.Location = new System.Drawing.Point(0, 48);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(100, 23);
            this.label16.TabIndex = 2;
            this.label16.Text = "Gradient:";
            this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label18
            // 
            this.label18.ForeColor = System.Drawing.Color.DarkGreen;
            this.label18.Location = new System.Drawing.Point(-2, 96);
            this.label18.Name = "label18";
            this.label18.Size = new System.Drawing.Size(100, 23);
            this.label18.TabIndex = 4;
            this.label18.Text = "Border Color:";
            this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label19
            // 
            this.label19.Location = new System.Drawing.Point(64, 426);
            this.label19.Name = "label19";
            this.label19.Size = new System.Drawing.Size(100, 23);
            this.label19.TabIndex = 5;
            this.label19.Text = "Border Size:";
            // 
            // label20
            // 
            this.label20.ForeColor = System.Drawing.Color.DarkGreen;
            this.label20.Location = new System.Drawing.Point(-2, 72);
            this.label20.Name = "label20";
            this.label20.Size = new System.Drawing.Size(100, 23);
            this.label20.TabIndex = 3;
            this.label20.Text = "Hatch Style:";
            this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // btnChart
            // 
            this.btnChart.ForeColor = System.Drawing.Color.Green;
            this.btnChart.Location = new System.Drawing.Point(294, 311);
            this.btnChart.Name = "btnChart";
            this.btnChart.Size = new System.Drawing.Size(56, 24);
            this.btnChart.TabIndex = 8;
            this.btnChart.Text = "确定";
            this.btnChart.Click += new System.EventHandler(this.btnChart_Click);
            // 
            // btnExit
            // 
            this.btnExit.Cursor = System.Windows.Forms.Cursors.Hand;
            this.btnExit.ForeColor = System.Drawing.Color.DarkGreen;
            this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
            this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btnExit.Location = new System.Drawing.Point(538, 469);
            this.btnExit.Name = "btnExit";
            this.btnExit.Size = new System.Drawing.Size(56, 24);
            this.btnExit.TabIndex = 113;
            this.btnExit.Text = "退出";
            this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
            // 
            // ScoreAnalyse
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.BackColor = System.Drawing.SystemColors.Control;
            this.ClientSize = new System.Drawing.Size(624, 515);
            this.Controls.Add(this.btnExit);
            this.Controls.Add(this.tabControl1);
            this.Controls.Add(this.groupBox1);
            this.ForeColor = System.Drawing.SystemColors.Desktop;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "ScoreAnalyse";
            this.Text = "成绩统计";
            this.Load += new System.EventHandler(this.ScoreAnalyse_Load);
            this.groupBox1.ResumeLayout(false);
            this.tabControl1.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
            this.tabPage2.ResumeLayout(false);
            this.tabPage3.ResumeLayout(false);
            this.panel3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
            this.panel5.ResumeLayout(false);
            this.ResumeLayout(false);

		}
		#endregion

		private void Combo_Fill()
		{   
			
			try
			{
				if(this.conn1.State==ConnectionState.Closed)this.conn1.Open();						
				this.commandStr="select DepartmentName from Department";									
				this.Command1.CommandText=this.commandStr;
				this.DataReader1=this.Command1.ExecuteReader();
				while(this.DataReader1.Read())
				{
					this.comboDepartment.Items.Add(this.DataReader1["DepartmentName"].ToString());
					
				}
				this.DataReader1.Close();	
				this.commandStr="select SemesterName from Semester";									
				this.Command1.CommandText=this.commandStr;
				this.DataReader1=this.Command1.ExecuteReader();
				while(this.DataReader1.Read())
				{
					this.comboSemester.Items.Add(this.DataReader1["SemesterName"].ToString());
					
				}
				this.DataReader1.Close();				

			}

			catch(Exception E)
			{
				MessageBox.Show(E.ToString());
			}
			finally
			{
				this.conn1.Close();			
			}				

		}
		

		private void comboDepartment_SelectedIndexChanged_1(object sender, System.EventArgs e)
		{
			this.comboClass.Items.Clear();
			try
			{
				this.conn1.Open();						
				this.commandStr="select ClassName from Class where DepartmentName="+"'"+this.comboDepartment.Text+"'";									
				this.Command1.CommandText=this.commandStr;
				this.DataReader1=this.Command1.ExecuteReader();
				while(this.DataReader1.Read())
				{
					this.comboClass.Items.Add(this.DataReader1["ClassName"].ToString());					
				}
				this.DataReader1.Close();				
				
			}
			catch(Exception E)
			{
				MessageBox.Show(E.ToString());
			}
			finally
			{
				this.DataReader1.Close();
				this.conn1.Close();	
			}		
		
		}

		private void ScoreAnalyse_Load(object sender, System.EventArgs e)
		{
			this.Combo_Fill();
		}		

		private void btnAnalyse_Click(object sender, System.EventArgs e)
		{
			this.DataSetScore.Clear();
			this.listView1.Items.Clear();			
			try
			{
				this.conn1.Open();						
				this.selectStr="select * from View_Score where Class='"+this.comboClass.Text+"' and Course='"+this.comboCourse.Text+"'";			
				this.sqlDataAdapter1=new SqlDataAdapter(this.selectStr,this.conn1);
				this.DataSetScore.Clear();
				this.sqlDataAdapter1.Fill(this.DataSetScore,"View_Score");						
				this.dataGrid1.DataSource=this.DataSetScore;
				this.dataGrid1.DataMember="View_Score";				
				
			}
			catch(Exception E)
			{
				MessageBox.Show(E.ToString());
			}
			finally
			{				
				this.conn1.Close();	
			}		
			

⌨️ 快捷键说明

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