//ENCERRA O SISTEMA private void button5_Click(object sender, EventArgs e) { Close(); //ABRE A LOGO HH vieww view = new vieww(); view.Show(); //ATRASA A PLICAÇÃO System.Threading.Thread.Sleep(2000); view.Close(); Dispose(); }
public Form1() { //INSTANCIA A TELA DE LOGIN login login = new login(); login.ShowDialog(); //INSTANCIA A LOGO HH vieww view = new vieww(); view.Show(); //ATRASA O PROCESSO DOIS SEGUNDOS NA LOGO System.Threading.Thread.Sleep(2000); view.Close(); InitializeComponent(); //VERIFICAÇÃO DE QUAL USUARIO ENTRA NO SISTEMA if (login.Name1 != "admin") { button3.Enabled = false; //STRING DE CONEXÃO string StrConn = "Persist Security Info=False; server=localhost; database=regougar; uid=root; pwd=admin"; // PASSANDO A STRING DE CONEXÃO MySqlConnection conn = new MySqlConnection(StrConn); //QUERY DE CONSULTA NO BANCO string query = "select Nome from login where login="******""; MySqlCommand cmd = new MySqlCommand(query, conn); MySqlDataAdapter adapter = new MySqlDataAdapter(query, conn); DataSet set = new DataSet(); } }