0 امتیاز
قبل در برنامه نویسی توسط (89 امتیاز)
ویرایش شده قبل توسط

اشکال من کجاست؟

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();

سوالات مشابه

0 امتیاز
1 پاسخ 798 بازدید
سوال شده 9 سال قبل در برنامه نویسی توسط ashkan (49 امتیاز)
0 امتیاز
1 پاسخ 2.1هزار بازدید
+1 امتیاز
1 پاسخ 3.6هزار بازدید
0 امتیاز
1 پاسخ 3.0هزار بازدید
0 امتیاز
0 پاسخ 1.3هزار بازدید
0 امتیاز
0 پاسخ 1.6هزار بازدید
0 امتیاز
0 پاسخ 347 بازدید
...