第一范文网 - 专业文章范例文档资料分享平台

C#超市商品库存管理信息系统--课程设计任务书

来源:用户分享 时间:2025/7/8 17:41:20 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

沈阳航空航天大学设计用纸

catch (Exception e1) {

MessageBox.Show(e1.Message); } finally {

myConn.Close(); //关闭数据库连接 } }

private void button5_Click(object sender, EventArgs e) {

string ConnString1 = \ OdbcConnection OdbcConnection(ConnString1);

try {

myConn.Open(); //打开连接 MessageBox.Show(\修改 \ OdbcCommand

myCommand

=

myConn

=

new

myConn.CreateCommand(); //创建命令对象myCommand

string ld_1 = this.textBox1.Text; string ls_2 = this.textBox2.Text;

25

沈阳航空航天大学设计用纸

string ls_3 = this.textBox3.Text; string ls_4 = this.textBox4.Text; string ls_5 = this.textBox5.Text; string ls_6 = this.textBox6.Text;

myCommand.CommandText = \student SET 名称 ='\+ ls_2 + \编号 = \+ ld_1 + \ //UPDATE oki!!

myCommand.Connection = myConn;

int rtn = myCommand.ExecuteNonQuery(); //执行命令返回结果指派给DataReader对象myReader

//object rtn = myCommand.ExecuteScalar(); //ExecuteScalar 统计,查询,只读取首行首列

MessageBox.Show(rtn.ToString() + \商品信息被修改\

this.studentTableAdapter.Fill(this.dataSet1.student);

}

catch (Exception e1) {

MessageBox.Show(e1.Message); } finally {

myConn.Close(); //关闭数据库连接

26

沈阳航空航天大学设计用纸

} } 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;

namespace _143403030608 {

public partial class Form3 : Form {

public Form3() {

InitializeComponent(); }

private void button1_Click(object sender, EventArgs e) {

if (textBox1.Text == \ {

27

沈阳航空航天大学设计用纸

button2.Enabled = true;

label3.Text = \密码正确,请点击下一步继续\

label3.ForeColor = Color.Blue; } else

{ label3.Text = \密码错误,请查正后输入!\ label3.ForeColor = Color.Red; } }

private void button2_Click(object sender, EventArgs e) {

Form4 frm1 = new Form4(); frm1.Show(); this.Hide(); }

private void button3_Click(object sender, EventArgs e) {

Form1 frm1 = new Form1(); frm1.Show(); this.Hide(); }

28

C#超市商品库存管理信息系统--课程设计任务书.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c0wk0407acr1xep036fj71ujtp7zr5k019fr_8.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top