private void btnSeeAllEntry_Click(object sender, EventArgs e) { FormShop.CurrentUser = EntryControl.CurrentUser; FormShop formShop = new FormShop(this); formShop.ShowDialog(); }
private void btJoinUser_Click(object sender, EventArgs e) { MySqlConnection conectaruser = new MySqlConnection("server=localhost; database=login; UID=root; password=;"); conectaruser.Open(); MySqlCommand codigo = new MySqlCommand(); MySqlConnection conectanos = new MySqlConnection(); codigo.Connection = conectaruser; codigo.CommandText = ("Select *from logindatos where nombre ='" + tbNickUser.Text + "'and contraseña = '" + tbPassUser.Text + "'"); MySqlDataReader leer = codigo.ExecuteReader(); if (leer.Read()) { MessageBox.Show("bienvenido"); Form register = new FormShop(); register.Show(); this.Hide(); } else { MessageBox.Show("error"); } conectaruser.Close(); }
private void LojasToolStripMenuItem_Click(object sender, EventArgs e) { if (FSh != null) { FSh.Close(); } FSh = new FormShop { MdiParent = this }; FSh.Activate(); FSh.Show(); }