示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            OleDbCommand command = new OleDbCommand();

            command.Connection  = myConnection;
            command.CommandText = "SELECT * FROM Autorithation where Login='******'and Parol='" + textBox2.Text + "'";
            OleDbDataReader reader = command.ExecuteReader();
            int             z      = 0;

            while (reader.Read())
            {
                z++;
            }
            if (z == 1)
            {
                // MessageBox.Show("Супер");
                Gm new1 = new Gm();
                new1.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Неправильный логин или пароль ");
            }
        }
示例#2
0
        private void label1_Click(object sender, EventArgs e)
        {
            Gm new1 = new Gm();

            new1.Show();

            /*Vhod new1 = new Vhod();
             * new1.Show();*/
            Hide();
        }