Example #1
0
        private void back_Click(object sender, EventArgs e)
        {
            Rapporteur_data2 a = new Rapporteur_data2();

            a.Show();
            this.Close();
        }
Example #2
0
        private void CheckPassword_Click(object sender, EventArgs e)
        {
            SqlConnection  sqlConnection  = new SqlConnection(@"Data Source=DESKTOP-I5HK0D4;Initial Catalog=Scientific_conference;Integrated Security=True");
            string         query          = "SELECT * FROM Groups WHERE [Group]='" + User.Text + "' and Pass='******'";
            SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(query, sqlConnection);
            DataTable      dataTable      = new DataTable();

            sqlDataAdapter.Fill(dataTable);
            if (dataTable.Rows.Count == 1)
            {
                Password.Clear();
                this.Hide();
                if (dataTable.Rows[0]["Group"].ToString().Trim() == "Организатор")
                {
                    Org org = new Org();
                    org.Show();
                }
                if (dataTable.Rows[0]["Group"].ToString().Trim() == "Докладчик")
                {
                    Rapporteur_data2 rap = new Rapporteur_data2();
                    rap.Show();
                }
            }
            else
            {
                MessageBox.Show("Произошла ошибка! Проверьте тип пользователя и пароль.");
                Password.Clear();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Rapporteur_data2 rap = new Rapporteur_data2();

            rap.Show();
            this.Close();
        }