string strConnect = "Data Source= WIN7-20140505FL;Initial Catalog=work;Persist Security Info=True;User ID=sa;Password=123";
SqlConnection conConnection = new SqlConnection(strConnect);
conConnection.Open();
string cmd = "insert into 磨平面(生产型号,工号,姓名,日期,备注) values ('" + textBox7.Text + "','" + textBox6.Text + "','" + textBox32.Text + "','" + textBox31.Text + "','" + textBox33.Text +"')";
SqlCommand com = new SqlCommand(cmd, conConnection);
com.ExecuteNonQuery();
conConnection.Close();
MessageBox.Show("录入成功", "提示");
this.Hide();
AppMain f1 = new AppMain();
f1.ShowDialog();