اشکال من کجاست؟
bool newMode = false;
String strsql = "SELECT * FROM stInfoTable";
SqlConnection con = new SqlConnection("Data Source = ... ;initial catalog =... ; integrated security = True");
con.Open();
DataSet ds = new DataSet();
DataRow newRow = ds.Tables["stInfoTable"].NewRow();
newMode = true;
textRecord.BackColor = Color.Red;
textRecord.Text = "textRecord";
MessageBox.Show("Enter a new record and press save");
SqlDataAdapter da = new SqlDataAdapter(strsql, con);
da.Fill(ds, "stInfoTable");
textBox1.DataBindings.Add(new Binding("Text", ds, "stInfoTable.stNo"));
textBox2.DataBindings.Add(new Binding("Text", ds, "stInfoTable.FirstName"));
textBox3.DataBindings.Add(new Binding("Text", ds, "stInfoTable.LastName"));
textBox4.DataBindings.Add(new Binding("Text", ds, "stInfoTable.Ave"));
textBox5.DataBindings.Add(new Binding("checked", ds, "stInfoTable.numUnit"));
checkBox1.DataBindings.Add(new Binding("Text", ds, "stInfoTable.Sex"));
con.Close();