数据库课程设计--小型电子商务数据管理系统内容摘要:

{ get //读 { return str。 } set//写 { str = value。 } } private void label5_Click(object sender, EventArgs e) { } private void label1_Click(object sender, EventArgs e) { } SqlConnection conn。 private void btnselect_Click(object sender, EventArgs e) { conn = new SqlConnection(Data Source=(local)。 Initial Catalog=bookstore。 Integrated Security=True)。 ()。 SqlCommand cmd = new SqlCommand(select * from books, conn)。 SqlDataAdapter sda = new SqlDataAdapter()。 = cmd。 DataSet ds = new DataSet()。 (ds, books)。 = [0]。 [bno].HeaderText = 编号。 [bname].HeaderText = 名称。 [tno].HeaderText = 类别号。 [page].HeaderText = 页数。 [price].HeaderText = 单价。 [quantity].HeaderText = 数量。 [pbsno].HeaderText = 出版社代号。 [edition].HeaderText = 版次。 [first_author].HeaderText = 第一作者。 [date_of_publish].HeaderText = 出版年月。 [description].HeaderText = 内容简介。 ()。 } private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { = [0].()。 = [4].()。 } private void Calc_Click(object sender, EventArgs e) { float a, b, sum。 if ((, out a) amp。 amp。 (, out b))//关于 TryParse的使用方法,见补充知识。 { sum = a * b。 = ()。 ()。 } else { (计算出错。 )。 } } private void button1_Click(object sender, EventArgs e) { Random rad = new Random()。 //实例化随机数产生器 rad; int value = (1000, 10000)。 //用 rad生成大于等于 1000,小于等于 9999的随机数; = ()。 //用 label控件 label1显示产生的四位随机数; } SqlConnection conn1。 SqlCommand cmd。 private void btnSubmit_Click(object sender, EventArgs e) { conn1 = new SqlConnection(Data Source=(local)。 Initial Catalog=bookstore。 Integrated Security=True)。 ()。 SqlCommand cmd = new SqlCommand()。 = conn1。 = insert into border(Ono,Cno,bno,quantity,price,paytype,cstatus) values( + () + , + () + , + + , + () + , + () + , + 39。 + () + 39。 + , + ().ToString() + )。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。