xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 2.09MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-06
  • 語言: C#
  • 標簽: C#??

資源簡介

C#版學生綜合信息管理系統,界面看上去挺不錯,它可以完成學生個人信息管理、考試管理、作業提交、討論交流、在線答題、成績查詢等功能,在VS2005下順利編譯,使用MSSQL數據庫,運行前請先附加數據庫。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
//下載自:源碼愛好者?http://www.codefans.net
namespace?Loginframe
{
????public?partial?class?AddQuestion?:?Form
????{
????????public?AddQuestion()
????????{
????????????InitializeComponent();
????????????
????????}

????????private?void?AddQuestion_Load(object?sender?EventArgs?e)
????????{
????????????string?sql?=?“select?SubjectName?from?Subject“;
????????????try
????????????{
????????????????SqlCommand?command?=?new?SqlCommand(sql?DbHelper.connection);
????????????????DbHelper.connection.Open();

????????????????SqlDataReader?dataReader?=?command.ExecuteReader();

????????????????while?(dataReader.Read())
????????????????{
????????????????????cboSubject.Items.Add(dataReader[“SubjectName“].ToString());
????????????????}
????????????????dataReader.Close();
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????MessageBox.Show(ex.Message);

????????????}
????????????finally?{
????????????????DbHelper.connection.Close();
????????????}
????????}
????????????????
????????private?void?btnAdd_Click(object?sender?EventArgs?e)
????????{
????????????string?question?=?txtQuestion.Text.Trim();
????????????string?optionA?=?txtAnserA.Text.Trim();
????????????string?optionB?=?txtAnserB.Text.Trim();
????????????string?optionC?=?txtAnserC.Text.Trim();
????????????string?optionD?=?txtAnserD.Text.Trim();
????????????string?subject?=?cboSubject.Text;
????????????int?subjectId?=?0;
????????????string?answer?=?““;
????????????int?difficulty?=?0;
????????????if?(!ValidateInput())
????????????{
????????????????MessageBox.Show(“信息填寫不完整!“);
????????????}
????????????else?{
????????????????string?sql?=?string.Format(“select?SubjectId?from?Subject?where?SubjectName=‘{0}‘“subject);
????????????????try
????????????????{
????????????????????SqlCommand?command?=?new?SqlCommand();
????????????????????command.CommandText?=?sql;
????????????????????command.Connection?=?DbHelper.connection;
????????????????????DbHelper.connection.Open();
????????????????????
????????????????????//得到科目編號
????????????????????subjectId?=?(int)command.ExecuteScalar();
????????????????????//SqlDataReader?dataReader?=?command.ExecuteReader();
????????????????????//if(dataReader.Read()){
????????????????????//????subjectId?=?(int)dataReader[0];
????????????????????//}
????????????????????//dataReader.close();
????????????????????
????????????????????//確定答案
????????????????????if?(rdoA.Checked)?{
????????????????????????answer?=?“A“;
????????????????????}else?if?(rdoB.Checked)?{
????????????????????????answer?=?“B“;
????????????????????}else?if?(rdoC.Checked)?{
????????????????????????answer?=?“C“;
????????????????????}else{
????????????????????????answer?=?“D“;
????????????????????}


????????????????????//確定難

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

-----------?---------??----------?-----??----

?????????????12979519????????????????????120


評論

共有 條評論