B
Beebee1988
Guest
private void Form2_Load(object sender, EventArgs e)
{
koneksicustomer = new SqlConnection("Data Source =.; AttachDbFilename = R:\\future\\STB KA SJ\\STB KA SJ\\Customer.mdf; Integrated Security = True; Connect Timeout = 30");
koneksicustomer.Open();
commandcustomer = new SqlCommand("Select * from CustomerTable", koneksicustomer);
adaptorcustomer = new SqlDataAdapter();
adaptorcustomer.SelectCommand = commandcustomer;
tabelcustomer = new DataTable();
adaptorcustomer.Fill(tabelcustomer);
managercustomer = (CurrencyManager)this.BindingContext[tabelcustomer];
textBox10.DataBindings.Add("Text", tabelcustomer, "CustomerID");
textBox1.DataBindings.Add("Text", tabelcustomer, "CompanyName");
textBox2.DataBindings.Add("Text", tabelcustomer, "Address1");
textBox3.DataBindings.Add("Text", tabelcustomer, "Address2");
textBox4.DataBindings.Add("Text", tabelcustomer, "Address3");
private void button11_Click(object sender, EventArgs e)
{
string carinama = textBox1.Text;
int carirow;
managercustomer.EndCurrentEdit();
tabelcustomer.DefaultView.Sort = "CompanyName";
carirow = tabelcustomer.DefaultView.Find(carinama);
managercustomer.Position = carirow;
SetState("Lihat");
PLease help to take alook, After i fill textBox1 which database have the reference
why when this button11_Click done, nothing happen on my textBox 10 and 2-4
Continue reading...
{
koneksicustomer = new SqlConnection("Data Source =.; AttachDbFilename = R:\\future\\STB KA SJ\\STB KA SJ\\Customer.mdf; Integrated Security = True; Connect Timeout = 30");
koneksicustomer.Open();
commandcustomer = new SqlCommand("Select * from CustomerTable", koneksicustomer);
adaptorcustomer = new SqlDataAdapter();
adaptorcustomer.SelectCommand = commandcustomer;
tabelcustomer = new DataTable();
adaptorcustomer.Fill(tabelcustomer);
managercustomer = (CurrencyManager)this.BindingContext[tabelcustomer];
textBox10.DataBindings.Add("Text", tabelcustomer, "CustomerID");
textBox1.DataBindings.Add("Text", tabelcustomer, "CompanyName");
textBox2.DataBindings.Add("Text", tabelcustomer, "Address1");
textBox3.DataBindings.Add("Text", tabelcustomer, "Address2");
textBox4.DataBindings.Add("Text", tabelcustomer, "Address3");
private void button11_Click(object sender, EventArgs e)
{
string carinama = textBox1.Text;
int carirow;
managercustomer.EndCurrentEdit();
tabelcustomer.DefaultView.Sort = "CompanyName";
carirow = tabelcustomer.DefaultView.Find(carinama);
managercustomer.Position = carirow;
SetState("Lihat");
PLease help to take alook, After i fill textBox1 which database have the reference
why when this button11_Click done, nothing happen on my textBox 10 and 2-4
Continue reading...