Ejemplo n.º 1
0
        private void gunaLabel8_Click(object sender, EventArgs e)
        {
            this.Hide();
            SIGN_IN sIGN_IN = new SIGN_IN();

            sIGN_IN.Show();
        }
Ejemplo n.º 2
0
        private void btnSignIN_Click(object sender, EventArgs e)
        {
            this.Hide();
            SIGN_IN sIGN_IN = new SIGN_IN();

            sIGN_IN.Show();
        }
Ejemplo n.º 3
0
        private void btnSignUP_Click(object sender, EventArgs e)
        {
            try
            {
                if (TextBoxName.Text != "Name" && TextBoxSurname.Text != "Surname" && TextBoxUsername.Text != "Username" && TextBoxPassword.Text != "Password")
                {
                    OleDbCommand command = new OleDbCommand("INSERT INTO [User] (uName, uSurname, uUsername, uPassword) VALUES ('" + TextBoxName.Text + "', '" + TextBoxSurname.Text + "', '" + TextBoxUsername.Text + "', '" + TextBoxPassword.Text + "')", connection);

                    connection.Open();
                    command.ExecuteNonQuery();
                    connection.Close();

                    this.Hide();
                    SIGN_IN sIGN_IN = new SIGN_IN();
                    sIGN_IN.Show();
                }
                else
                {
                    if (TextBoxName.Text == "Name")
                    {
                        TextBoxName.BorderColor = Color.Red;
                    }
                    if (TextBoxSurname.Text == "Surname")
                    {
                        TextBoxSurname.BorderColor = Color.Red;
                    }
                    if (TextBoxPassword.Text == "Password")
                    {
                        TextBoxPassword.BorderColor = Color.Red;
                    }
                    if (TextBoxUsername.Text == "Username")
                    {
                        TextBoxUsername.BorderColor = Color.Red;
                    }
                    panelInfo.Visible       = true;
                    labelMessenge.ForeColor = Color.Red;
                    labelMessenge.Text      = "Есть пустые поля";
                }
            }
            catch
            {
                panelInfo.Visible       = true;
                labelMessenge.ForeColor = Color.Red;
                labelMessenge.Text      = "Пользователь с таким UserName уже зарегестрирован";
                connection.Close();
            }
        }