C#学生综合信息管理系统


C#学生综合信息管理系统,包含完整的源代码,数据库
资源截图
代码片段和文件信息
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“;
                    }


                    //确定难

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5441  2009-05-08 00:58  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddQuestion.cs

     文件      17603  2008-06-12 19:52  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddQuestion.Designer.cs

     文件       5814  2008-06-12 19:52  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddQuestion.resx

     文件       5756  2008-06-13 13:11  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddStuForm.cs

     文件      19839  2009-05-08 00:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddStuForm.Designer.cs

     文件      17946  2008-06-13 13:11  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAddStuForm.resx

     文件       1458  2009-05-08 00:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAdminForm.cs

     文件      14200  2009-05-08 00:58  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAdminForm.Designer.cs

     文件      26105  2008-06-17 12:29  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAdminForm.resx

     文件       4702  2009-05-08 00:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerCard.cs

     文件      27143  2008-06-30 16:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerCard.Designer.cs

     文件       6009  2008-06-30 16:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerCard.resx

     文件       5924  2008-06-30 16:07  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerQuestion.cs

     文件       8769  2008-06-26 17:54  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerQuestion.Designer.cs

     文件       6007  2008-06-26 17:54  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeAnswerQuestion.resx

     文件        396  2008-06-14 10:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeapp.config

     文件        540  2008-06-17 10:40  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeDbHelper.cs

     文件        627  2008-06-10 13:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeHelp.cs

     文件       2641  2009-05-08 00:58  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeHelp.Designer.cs

     文件       6008  2008-06-10 13:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeHelp.resx

     文件       4418  2009-05-08 00:58  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginForm.cs

     文件       5500  2009-05-08 00:58  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginForm.Designer.cs

     文件      76557  2008-06-17 11:41  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginForm.resx

     文件      12009  2008-06-19 10:49  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginframe.csproj

     文件        168  2008-06-23 16:53  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginframe.csproj.user

     文件        263  2009-05-08 00:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeLoginType.cs

     文件      61873  2009-05-08 00:59  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeMySchoolDataSet.Designer.cs

     文件          3  2008-06-14 10:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeMySchoolDataSet.xsc

     文件      22475  2008-06-14 10:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeMySchoolDataSet.xsd

     文件          3  2008-06-14 10:50  C#学生综合信息管理系统完整版源码xueshengxinxiguanlixitoMySchoolBackupLoginframeMySchoolDataSet.xss

............此处省略346个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)