//修改用户按钮事件 private void ButtonUpd_Click(object sender, EventArgs e) { ClassSqlConnect upd = new ClassSqlConnect(); string updItems; updItems = ("USER" + TextUID1.Text.ToString() + "," + textUName1.Text.ToString() + "," + TextUPower1.Text.ToString() + "," + TextUP1.Text.ToString() + " "); upd.Update(updItems); updItems = ("USER"); DataSet ds = upd.Select(updItems); this.DataGridView1.DataSource = ds; this.DataGridView1.DataMember = "USERS"; upd.Close(); }
//更新销售记录按钮事件 private void button3_Click(object sender, EventArgs e) { ClassSqlConnect upd = new ClassSqlConnect(); string updItems; updItems = ("SALE" + textBox1.Text.ToString() + "," + textBox2.Text.ToString() + "," + textBox3.Text.ToString() + "," + textBox4.Text.ToString() + "," + textBox5.Text.ToString() + "," + textBox6.Text.ToString() + "," + textBox7.Text.ToString() + " "); upd.Update(updItems); updItems = ("SALE"); DataSet ds = upd.Select(updItems); this.dataGridView1.DataSource = ds; this.dataGridView1.DataMember = "SALE"; upd.Close(); }
//修改出库记录按钮事件 private void button6_Click(object sender, EventArgs e) { ClassSqlConnect upd = new ClassSqlConnect(); string updItems; updItems = ("OUST" + textBox7.Text.ToString() + "," + textBox8.Text.ToString() + "," + textBox9.Text.ToString() + "," + textBox10.Text.ToString() + " "); upd.Update(updItems); updItems = ("OUST"); DataSet ds = upd.Select(updItems); this.dataGridView2.DataSource = ds; this.dataGridView2.DataMember = "OUTSTORE"; upd.Close(); }