Пример #1
0
        private void button8_Click_2(object sender, EventArgs e)
        {
            loginPanel.Hide();
            RegistrationPanel.Hide();

            ////////////////////
        }
Пример #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     textBox6.PasswordChar = '*';
     loginPanel.Show();
     RegistrationPanel.Hide();
     textBox11.ReadOnly = true;
     ren();
 }
Пример #3
0
 private void LoginTab_Click(object sender, EventArgs e)
 {
     if (currentTabIndex == 1)
     {
         timer_slider.Start();
         RegisterTab.BackColor = Color.FromArgb(59, 102, 128);
         LoginTab.BackColor    = Color.FromArgb(23, 117, 173);
         LoginPanel.Show();
         RegistrationPanel.Hide();
         currentTabIndex = 0;
     }
 }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            sql = "insert into Accounts values (@Username,@Password,@name)";
            cmd = new SqlCommand(sql, con);
            cmd.Parameters.AddWithValue("@Username", textBox1.Text);
            cmd.Parameters.AddWithValue("@Password", textBox2.Text);
            cmd.Parameters.AddWithValue("@name", textBox3.Text);

            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
            loginPanel.Show();
            RegistrationPanel.Hide();
        }
Пример #5
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            sql = "select * from Accounts where username=@un and Password=@up";
            cmd = new SqlCommand(sql, con);
            cmd.Parameters.AddWithValue("@un", textBox5.Text);
            cmd.Parameters.AddWithValue("@up", textBox6.Text);
            con.Open();
            SqlDataReader sqlread = cmd.ExecuteReader();

            while (sqlread.Read())
            {
                if (textBox5.Text == sqlread.GetValue(1).ToString() && textBox6.Text == sqlread.GetValue(2).ToString())
                {
                    name = sqlread.GetValue(3).ToString();
                    tabControl1.Show();
                    loginPanel.Hide();
                    RegistrationPanel.Hide();
                }
            }
            con.Close();
        }