4.3代码开发
在本次课程设计中,我们小组负责的是学生管理系统项目,其中,我承担的是开发人员 ,开发代码是我们开发人员的事情,先开发代码,然后交由测试人员测试,如遇到问题,再由开发人员,进行修改,重复以上几步,直到将程序调整到令人满意的程度。
我和孙智斌负责我们这组的代码开发。我们分工完成了这个程序。
我负责编写登陆界面、主界面、用户管理模块、系统信息模块,退出系统等。并且将孙智斌编写的其他模块代码,连接结合起来,从而完成学生管理系统。
登陆界面代码:
using System;
using System.Collections.Generic; using http://www.77cn.com.cnponentModel; using System.Data; using System.Drawing; using System.Text;
using System.Windows.Forms; using System.Data.SqlClient;
namespace 用户 {
public partial class Form1 : Form {
private info owner; public Form1(info owner) {
InitializeComponent(); this.CenterToScreen(); this.owner = owner; }
private void Form1_Load(object sender, EventArgs e) { }
private void button1_Click(object sender, EventArgs e) { try {
SqlConnection myconnection = new SqlConnection();
myconnection.ConnectionString = ("Server=LENOVO-3927D0AD\\SQLEXPRESS;Integrated Security=True;" +
"Database=stu"); myconnection.Open();
SqlCommand mycommand = new SqlCommand();
http://www.77cn.com.cnmandText = "select * from t_user where f_username='" + textBox1.Text.Trim() +