AccessTr.neT

Tam Versiyon: webbrowser İF hakkında
Şu anda arşiv modunu görüntülemektesiniz. Tam versiyonu görüntülemek için buraya tıklayınız.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error Resume Next

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 1)

End Sub

Bu kod ile açılan sayfada "isyeriacilisyil" id li alanın "1" (MERKEZ) alanını seçtirtiyorum. ("2" ŞUBE)

Bana bu işlemden önde bir if lazım onunda şartı şudur

Eğer textbox1 de veri varsa

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 1)

Eğer textbox2 de veri varsa

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 2)

Eğer textbox1 ve textbox2 de aynı anda veri varsa "Merkezmi Şubemi kaydı yapılacak" şekline soru sormasını istiyorum. Teşekürler

If (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Boş - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("1 Boş - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

İki tane metin kutusu : textBox1 ve textBox2 ekleyin. Bir buton ekleyin ve Click olayına yukarıdaki kodları yapıştırın. Tüm ihtimallere göre if yapınız bu şekildedir.
(30/05/2012, 13:47)alpeki99 yazdı: [ -> ]

If (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Boş - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("1 Boş - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

İki tane metin kutusu : textBox1 ve textBox2 ekleyin. Bir buton ekleyin ve Click olayına yukarıdaki kodları yapıştırın. Tüm ihtimallere göre if yapınız bu şekildedir.

Teşekkürler