コード例 #1
0
ファイル: submit.cs プロジェクト: spectro30/OfflineJudge
        private void bunifuThinButton26_Click(object sender, EventArgs e)
        {
            string i1 = input1.Text;
            string i2 = input2.Text;
            string i3 = input3.Text;

            if (i1 == "0" && i2 == "1" && i3 == "3524578")
            {
                MessageBox.Show("Wohoo!!!\nYour Solution is Accepted\n");
                this.Close();
                Problemset p = new Problemset();
                p.ShowDialog();
            }
            else
            {
                MessageBox.Show("Wriong Answer\nHold on, You can do it !!! \n");
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: spectro30/OfflineJudge
        private void LoginButton_Click(object sender, EventArgs e)
        {
            String        user_id    = useridBox.Text;
            String        password   = passwordBox.Text;
            SqlConnection connection = new SqlConnection(conString);

            connection.Open();
            SqlCommand    selectCommand = new SqlCommand(" Select * from reg where userid = '" + user_id + "' and password ='******'", connection);
            SqlDataReader dataFromDb    = selectCommand.ExecuteReader();

            if (dataFromDb.HasRows)
            {
                MessageBox.Show("Login Succesful");
                this.Hide();
                Problemset ct = new Problemset();
                ct.ShowDialog();
            }
            else
            {
                MessageBox.Show("Email or/and Password is wrong");
            }
        }