1、上机实习报告总结结尾上机实习报告总结结尾一. 首页 代码如下; using System; using ; using ; using ; using ; using ; using ; namespace WindowsApplication1 public partial class Form5 : Form public Form5() InitializeComponent(); private void button1_Click(object sender, logo from = new logo(); (); EventArgs e) private void button2_
2、Click(object sender, EventArgs e) Form2 from = new Form2(); (); private void button3_Click(object sender, EventArgs e)http:/shijuan/ 试卷 Form3 from = new Form3(); (); private void button4_Click(object sender, EventArgs e) Form4 from = new Form4(); (); 二. 登录模块 代码如下: using System; using ; using ; using
3、 ; using ; using ; using ; using ; namespace WindowsApplication1 public partial class logo : Form public logo() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) string connstring = Data Source=panlunzhao;Initial Catalog
4、=;Integrated Security=True; SqlConnection conn = new SqlConnection(connstring); (); string username = (); string password = (); SqlCommand comm = (); = select * from manage where username= + username + and password= + password + ; SqlDataReader sqlda = (); if () ifhttp:/gongzuobaogao/ 工作报告 (sqlda.To
5、String().Trim() = password) /(恭喜您登陆成功!, 登陆成功!, , ); /Form2 f = new Form2(); /(); Form3 from = new Form3(); (); else (密码错误,请重新输入!, 错误 , , ); else (此用户不存在,请您注册!, 注册, , ); ();http:/dangtuangongzuozongjie/ 党团工作总结 (); private void button2_Click(object sender, EventArgs e) = ; = ; 三. 会员管理模块 代码如下: using Sy
6、stem; using ; using ; using ; using ; using ; using ; using ; namespace WindowsApplication1 public partial class Form2 : Form protected SqlConnection conn; protected SqlCommand cmd; string connstring = Data Sou/article/ 述职报告rce=panlunzhao;Initial Catalog=;Integrated Security=True; public Form2() Ini
7、tializeComponent(); private void Form2_Load(object sender, EventArgs e) load1(); load(); protected void load1() string sql = select *from customer; conn = new SqlConnection(connstring); (); SqlDataAdapter da = new SqlDataAdapter(sql, conn); DataSet ds = new DataSet(); (ds, book); = ; protected void
8、load() conn = new SqlConnection(connstring); (); string sql_select = SELECT ID FROM customer ; cmd = new SqlCommand(sql_select, conn); SqlDataReader dr = (); (); while () (dr); (); private DataTable BindData(string sql) string sql_select = sql; conn = new SqlConnection(connstring); SqlDataAdapter ad
9、 = new SqlDataAdapter(sql_select, conn); DataSet ds = new DataSet(); (ds, customer); return ; private void button1_Click(object sender, EventArgs e) string sql = select * from customer where ID= + () + ; conn = new SqlConnection(connstring); (); SqlCommand cmd = new SqlCommand(sql, conn); SqlDataRea
10、der ds = (); (); = ds.ToString(); http:/xuexiaogongzuozongjie/ 学校工作总结 = ds.ToString(); = ds.ToString(); = ds.ToString(); = ds.ToString(); = ds.ToString(); = ds.ToString(); = ds.ToString(); = (bool)ds; private void update_Click(object sender, EventArgs e) string sql = customer set name=name,Levels=Le
11、vels,Birthday=Birthday,Degree=Degree,Address=Address,Telephone=Telephone,Email=Email,Score=Score where ID=ID; conn = new SqlConnection(connstring); (); cmd = new SqlCommand(sql, conn); (ID, ).Value = (); (name, , 20).Value = (); (Levels, ).Value = (); (Birthday, ).Value = (); (Degree, , 20).Value =
12、(); (Address, , 256).Value = (); (Telephone, , 50).Value = (); (Email, , 50).Value = (); (http:/yundonghuiyanjianggao/ 运动会演讲稿 Gender, ).Value = (bool); (Score, ).Value = (); (); SqlDataReader ds = (); (); load1(); private void _Click(object sender, EventArgs e) string sql_ = into customer(Name,Levels,Gender,Birthday,Degree,Address,Telephone,Email,Score) values(Name,Levels,Gender,Birthday,Degree,Address,Telephone,Email,Score); cmd = new SqlCommand(sql_, conn); try (); (Name, , 20).Value = (); (Levels,
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1