Predmet:Re: hidden field - visible false
negde grešim
***login forma***
Private Sub btn_PrijaviSe_Click(sender As Object, e As EventArgs) Handles btn_PrijaviSe.Click
If con.State = ConnectionState.Open Then con.Close()
con.Open()
If txt_KorisnickoIme.Text = "" Then
MsgBox("Unesite korisničko ime..", MsgBoxStyle.Critical)
ElseIf txt_Lozinka.Text = "" Then
MsgBox("Unesite lozinku..", MsgBoxStyle.Critical)
Else
Dim query As String
query = "select * from T_Users where KorisnickoIme= '" + txt_KorisnickoIme.Text + "' and Password= '" + txt_Lozinka.Text + "'"
cmd = New SqlCommand(query, con)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
Dim a As Integer
a = ds.Tables(0).Rows.Count
If a = 0 Then
MsgBox("Neuspešno prijavljivanje! Pogrešno korisničko ime i/ili lozinka. Pokušajte ponovo.", MsgBoxStyle.Critical)
Else
Module1.KC_ID = ds.Tables(0).Rows(0).Item(14)
KorisnikID = ds.Tables(0).Rows(0).Item(0)
PodaciSaRelacije.Show()
Me.Hide()
End If
End If
End Sub
***
***Modul***
Module Module1
Public KC_ID As Integer
End Module
***forma za upis posle datuma***
Private Sub KNT_DF_DATUMTextBox_Leave(sender As Object, e As EventArgs) Handles KNT_DF_DATUMTextBox.Leave
Me.txt_KCID.Text = Module1.KC_ID
End Sub