[计算机软件及应用]河北工业大学软件工程汽车俱乐部管理系统实验报告内容摘要:

ing。 using。 namespace 汽车俱乐部 { public partial class Load : Form { public Load() { InitializeComponent()。 Tag = 0。 } DBClass db1 = new DBClass()。 18 private void button1_Click(object sender, EventArgs e) { if (() == || () == ) { (请完整填写用户信息 , 提示 )。 } else { ()。 string str = select * from 用户 where username=39。 + () + 39。 and password=39。 + () + 39。 OleDbCommand m = new OleDbCommand(str, )。 if (() != null) { ()。 Tag = 1。 ()。 if (() == fzw) { = 1。 } else { = 0。 } } else { (用户信息有误,请重新登录。 )。 ()。 } } } private void button2_Click(object sender, EventArgs e) { ()。 } } } 19 3 AddMemberForm( Module Name) 描述( Description) 添加会员代码 代码 (Program) using System。 using。 using。 using。 using。 using。 using。 using。 namespace 汽车俱乐部 { public partial class AddMemberForm : Form { public AddMemberForm() { InitializeComponent()。 } private void button2_Click(object sender, EventArgs e) { ()。 } private void button1_Click(object sender, EventArgs e) { if (() == || () == || () == || () == || () == || () == ) { (信息不完整 )。 } else { OleDbConnection con。 con = new OleDbConnection(provider=。 data Source=C:\\Users\\fzw\\Desktop\\。 Persist Security Info=False)。 ()。 string str1 = insert into 会员 (name,id,tel,sex,car_id,fee) values(39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + 20 () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 )。 OleDbCommand cmd1 = new OleDbCommand(str1, con)。 ()。 string str = select * from 会员。 OleDbCommand cmd = new OleDbCommand(str, con)。 OleDbDataAdapter da = new OleDbDataAdapter()。 = cmd。 DataSet ds = new DataSet()。 (ds, cs)。 = [0]。 ()。 (添加成功 ,提示 )。 } } private void AddMemberForm_Load(object sender, EventArgs e) { // TODO: 这行代码将数据加载到表 “ ”中。 您可以根据需要移动或移除它。 ( )。 } } } 4 ChangeMemberForm( Module Name) 描述( Description) 修改会员代码 代码 (Program) using System。 using。 using。 using。 using。 using。 using。 using。 namespace 汽车俱乐部 { public partial class ChangeMemberForm : Form { public ChangeMemberForm() 21 { InitializeComponent()。 } OleDbConnection con。 OleDbDataAdapter adapter。 private Boolean dbUpdate() { string strSql = select * from 会员。 DataTable dtUpdate = new DataTable()。 dtUpdate = (strSql)。 ()。 DataTable dtShow = new DataTable()。 dtShow = (DataTable)。 for (int i = 0。 i。 i++) { ([i])。 } try { ()。 OleDbCommandBuilder cmdbuilder。 cmdbuilder = new OleDbCommandBuilder()。 (dtUpdate)。 ()。 } catch(Exception ex) { (())。 return false。 } ()。 return true。 } private void button1_Click(object sender, EventArgs e) { if (dbUpdate()) { (修改成功。 )。 } } 22 private DataTable dbconn(string strSql) { ()。 = new OleDbDataAdapter(strSql, con)。 DataTable dtSelect = new DataTable()。 int rnt = (dtSelect)。 ()。 return dtSelect。 } private void button2_Click(object sender, EventArgs e) { ()。 } private void ChangeMemberForm_Load(object sender, EventArgs e) { con = new OleDbConnection(provider=。 data Source=C:\\Users\\fzw\\Desktop\\。 Persist Security Info=False)。 OleDbDataAdapter da = new OleDbDataAdapter(select * from 会员 , con)。 DataSet ds = new DataSet()。 (ds)。 = [0]。 // TODO: 这行代码将数据加载到表 “ ”中。 您可以根据需要移动或移除它。 ( )。 } } } 5 JiaoFeiForm( Module Name) 描述( Description) 会员交费代码 代码 (Program) using System。 using。 using。 using。 using。 using。 using。 us。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。