Пример #1
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            ApplicationJunkClass mainForm = new ApplicationJunkClass();
            mainForm.Show();
            string query = "select hashName, hashLogin from Hashing where hashLogin = \'" + inputLogin.Text + "\' and hash = \'" +inputPassword2.Text+ "\'";

            SqlDataReader data = Database.executeQuery(query);
            object[] fields = new object[3];
            data.Read();
            data.GetValues(fields);
            data.Close();

            string hashName = fields[0].ToString(), hashLogin = fields[1].ToString();
            mainForm.fillData(hashName, hashLogin);

            Database.executeQuery(query);
            //this.Close();
        }
Пример #2
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            ApplicationJunkClass mainForm = new ApplicationJunkClass();

            mainForm.Show();
            string query = "select hashName, hashLogin from Hashing where hashLogin = \'" + inputLogin.Text + "\' and hash = \'" + inputPassword2.Text + "\'";

            SqlDataReader data = Database.executeQuery(query);

            object[] fields = new object[3];
            data.Read();
            data.GetValues(fields);
            data.Close();

            string hashName = fields[0].ToString(), hashLogin = fields[1].ToString();

            mainForm.fillData(hashName, hashLogin);

            Database.executeQuery(query);
            //this.Close();
        }