frmWork.cs
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 CS2013 { public partial class frmWorks : Form { public frmWorks() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string sql = string.Format("insert into WORKS values('{0}','{1}','{2}','{3}')", this.textBox1.Text, this.textBox2.Text, this.comboBox1.Text, this.comboBox2.Text); SqlManage.TableChange(sql); } private void button2_Click(object sender, EventArgs e) { string sql = string.Format("update WORKS set WYEAR = '{2}',WSTAGE = '{3}' where TNO = '{0}' and CNO = '{1}'", this.textBox1.Text, this.textBox2.Text, this.comboBox1.Text, this.comboBox2.Text); SqlManage.TableChange(sql); } private void button3_Click(object sender, EventArgs e) { string sql = string.Format("delete from WORKS where TNO ='{0}' and CNO = '{1}'", this.textBox1.Text, this.textBox2.Text); SqlManage.TableChange(sql); } private void button4_Click(object sender, EventArgs e) { this.Close(); } } }
posted on 2017-03-16 16:02 Cody_Rainfall 阅读(213) 评论(0) 收藏 举报
浙公网安备 33010602011771号