AccessTr.neT
webbrowser İF hakkında - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: Visual Basic .NET (https://accesstr.net/forum-visual-basic-net.html)
+--- Forum: Visual Basic .NET Cevaplanmış Soruları (https://accesstr.net/forum-visual-basic-net-cevaplanmis-sorulari.html)
+--- Konu Başlığı: webbrowser İF hakkında (/konu-webbrowser-if-hakkinda.html)



webbrowser İF hakkında - drummers - 30/05/2012


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


Cvp: webbrowser İF hakkında - alpeki99 - 30/05/2012


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.


Cvp: webbrowser İF hakkında - drummers - 30/05/2012

(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