Esempio n. 1
0
 public void ConfirmRegistration(object sender, EventArgs e)
 {
     if (PasswordTextbox.Text == RepeatPasswordTextbox.Text)
     {
         username = UsernameTextbox.Text;
         DBAccessor.insertEntry("'" + UsernameTextbox.Text + "'|'" +
                                Math.Abs(PasswordTextbox.Text.GetHashCode() + username.GetHashCode()) + "'", "Users");
         confirmed = true;
         this.Close();
     }
 }
Esempio n. 2
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            int firstRow = AllMediaDataGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected);

            if (firstRow == -1)
            {
                return;
            }
            Console.WriteLine(this.PlaylistName);
            DBAccessor.insertEntry("'" + AllMediaDataGrid.Rows[firstRow].Cells["Filepath"].Value + "'|'" +
                                   this.PlaylistName + "'|'" + this.Username + "'|" + (this.PlaylistSize++), "Belongs_To");
            UpdateTables();
        }