.net学生信息管理系统源码20170606
.net学生信息管理系统源码20170606
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11526 2010-12-05 14:18 CourseEnter.Designer.cs
文件 2774 2016-06-29 18:29 CourseEnter.cs
文件 436628 2010-12-05 14:18 CourseEnter.resx
文件 22078 2010-12-05 15:21 CurChoice.Designer.cs
文件 3757 2010-12-05 15:21 CurChoice.cs
文件 270682 2010-12-05 15:21 CurChoice.resx
目录 0 2016-06-29 17:49 DB
文件 2293760 2016-06-30 14:04 DBStudentIfoMag.mdf
文件 573440 2016-06-30 14:04 DBStudentIfoMag_log.LDF
文件 6176 2010-12-05 16:21 Login.Designer.cs
文件 2327 2016-06-29 18:29 Login.cs
文件 290331 2010-12-05 16:21 Login.resx
文件 26585 2010-12-05 19:24 MainFrm.Designer.cs
文件 3044 2010-12-05 19:24 MainFrm.cs
文件 163735 2010-12-05 19:24 MainFrm.resx
文件 21375 2010-12-05 16:08 Other.Designer.cs
文件 11061 2016-06-29 18:29 Other.cs
文件 9579 2010-12-05 16:08 Other.resx
文件 9418 2010-12-05 17:23 Other2.Designer.cs
文件 3656 2016-06-29 18:29 Other2.cs
文件 624584 2010-12-05 17:23 Other2.resx
文件 494 2010-12-20 13:20 Program.cs
目录 0 2016-06-29 17:49 Properties
文件 1358 2010-11-24 19:05 PropertiesAssemblyInfo.cs
文件 2866 2016-06-29 17:50 PropertiesResources.Designer.cs
文件 5612 2010-11-24 19:05 PropertiesResources.resx
文件 1744 2016-06-29 18:28 PropertiesSettings.Designer.cs
文件 1021 2016-06-29 18:28 PropertiesSettings.settings
文件 11902 2010-12-05 15:01 Rank.Designer.cs
文件 2151 2016-06-29 18:28 Rank.cs
文件 269882 2010-12-05 15:01 Rank.resx
............此处省略184个文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace StudentIfoMag
{
public partial class CourseEnter : Form
{
public CourseEnter()
{
InitializeComponent();
}
private void CourseEnter_Load(object sender EventArgs e)
{
// TODO: 这行代码将数据加载到表“studentIfoMagDataSet18.course”中。您可以根据需要移动或移除它。
this.courseTableAdapter.Fill(this.studentIfoMagDataSet18.course);
comboBox1.SelectedIndex = 0;
}
private void button2_Click(object sender EventArgs e)
{
textBox1.Text = ““;
comboBox1.SelectedIndex = 0;
}
private void button1_Click(object sender EventArgs e)
{
if (textBox1.Text ==““)
{
MessageBox.Show(“请输入课程名!““提示“MessageBoxButtons.OK MessageBoxIcon.Exclamation );
}
else
{
string connString = @“Data Source=.SQL2005;Initial Catalog=StudentIfoMag;uid=sa;pwd=sasasa“;
SqlConnection connection = new SqlConnection(connString);
string sql = String.Format(“INSERT INTO course(courseNamecourseClass) VALUES (‘{0}‘‘{1}‘)“ textBox1.Text comboBox1.SelectedItem.ToString ()); //SQL语句
try
{
connection.Open();// 打开数据库连接
SqlCommand command = new SqlCommand(sql connection); //创建 Command 对象
int count = command.ExecuteNonQuery();// 执行添加命令返回值为更新的行数
if (count > 0)
{
courseTableAdapter.Fill(studentIfoMagDataSet18.course );
MessageBox.Show(“添加课程成功“ “录入成功“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
else
{
MessageBox.Show(“添加课程失败“ “录入失败“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message “操作数据库出错!“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
}
finally
{
connection.Close();// 关闭数据库连接
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11526 2010-12-05 14:18 CourseEnter.Designer.cs
文件 2774 2016-06-29 18:29 CourseEnter.cs
文件 436628 2010-12-05 14:18 CourseEnter.resx
文件 22078 2010-12-05 15:21 CurChoice.Designer.cs
文件 3757 2010-12-05 15:21 CurChoice.cs
文件 270682 2010-12-05 15:21 CurChoice.resx
目录 0 2016-06-29 17:49 DB
文件 2293760 2016-06-30 14:04 DBStudentIfoMag.mdf
文件 573440 2016-06-30 14:04 DBStudentIfoMag_log.LDF
文件 6176 2010-12-05 16:21 Login.Designer.cs
文件 2327 2016-06-29 18:29 Login.cs
文件 290331 2010-12-05 16:21 Login.resx
文件 26585 2010-12-05 19:24 MainFrm.Designer.cs
文件 3044 2010-12-05 19:24 MainFrm.cs
文件 163735 2010-12-05 19:24 MainFrm.resx
文件 21375 2010-12-05 16:08 Other.Designer.cs
文件 11061 2016-06-29 18:29 Other.cs
文件 9579 2010-12-05 16:08 Other.resx
文件 9418 2010-12-05 17:23 Other2.Designer.cs
文件 3656 2016-06-29 18:29 Other2.cs
文件 624584 2010-12-05 17:23 Other2.resx
文件 494 2010-12-20 13:20 Program.cs
目录 0 2016-06-29 17:49 Properties
文件 1358 2010-11-24 19:05 PropertiesAssemblyInfo.cs
文件 2866 2016-06-29 17:50 PropertiesResources.Designer.cs
文件 5612 2010-11-24 19:05 PropertiesResources.resx
文件 1744 2016-06-29 18:28 PropertiesSettings.Designer.cs
文件 1021 2016-06-29 18:28 PropertiesSettings.settings
文件 11902 2010-12-05 15:01 Rank.Designer.cs
文件 2151 2016-06-29 18:28 Rank.cs
文件 269882 2010-12-05 15:01 Rank.resx
............此处省略184个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)