//gumb: Prijava private void button2_Click(object sender, EventArgs e) { FSport fs = new FSport(); SqlConnection dataConnection = new SqlConnection(ConnectionString); dataConnection.Open(); //odpremo povezavo string poizvedba = "Select Count(*) from tbl_login where Username='******' and Password='******'"; using (SqlCommand dataCommand = new SqlCommand(poizvedba, dataConnection)) { if (System.Convert.ToInt32(dataCommand.ExecuteScalar()) == 1) //preverimo, če je bila poizvedba uspešna { _username = txtUser.Text; this.Hide(); //skrijemo prijavni obrazec FMeni meni = new FMeni(); //nov objekt za glavni obrazec meni.Show(); } else { MessageBox.Show("Napačno uporabniško ime ali geslo!"); Ponastavi(); } } }
private void pictureBox3_Click(object sender, EventArgs e) { FSport window = new FSport(); window.Show(); }
private void btnSport_Click(object sender, EventArgs e) { FSport window = new FSport(); window.Show(); }