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(); } }
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(); }