void Belepes() { string q = "select * from jelszo where jelszo like md5('" + txtPassword.Text + "')"; try { Kapcsolodas(); myComm = new MySqlCommand(q, myConn); dr = myComm.ExecuteReader(); if (dr.HasRows) { Foablak fablak = new Foablak(); fablak.Show(); this.Hide(); } else { MessageBox.Show("Érvénytelen jelszó!", "Hiba", MessageBoxButtons.OK, MessageBoxIcon.Error); txtPassword.PasswordChar = char.Parse("\0"); txtPassword.Text = "jelszó"; this.ActiveControl = null; } myConn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonVendegHozzaAd_Click(object sender, EventArgs e) { Foablak fablak = new Foablak(); VendegForm vendegF = new VendegForm(); fablak.panelFo.Controls.Clear(); vendegF.TopLevel = false; fablak.panelFo.Controls.Add(vendegF); vendegF.Dock = DockStyle.Fill; vendegF.Show(); }