try
{
conn.Close();
}
catch { return; }
// MyCommand.ExecuteNonQuery();
// conn.Close();
// MessageBox.Show("成功", "提示", MessageBoxButtons.OK, rmation);
// SqlConnection conn = new SqlConnection(MyConn);
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void Form4_Load(object sender, EventArgs e)
{
string MyConn = ;
conn = new SqlConnection(MyConn);
}
private void button2_Click(object sender, EventArgs e)
{
string MyInsert = "delete from 订单信息表where 订单号='" + textBox1.Text + "'";
SqlCommand MyCommand = new SqlCommand(MyInsert, conn);
conn.Open();
MyCommand.ExecuteNonQuery();
conn.Close();
MessageBox.Show("删除成功");
}
private void button3_Click(object sender, EventArgs e)
{
Form5 f = new Form5();
f.Show();
}
}
}
using System;
using
using ponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using
using
namespace WindowsApplication2
{
public partial class Form5 : Form
{
public SqlConnection conn;
public Form5()
{
InitializeComponent();
}
private void Form5_Load(object sender, EventArgs e)
{
string MyConn = ;
conn = new SqlConnection(MyConn);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string rnum = textBox1.Text;
string num = Form4.f.toos();
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新高中教育机票预订系统课程设计报告(18)全文阅读和word下载服务。
相关推荐: