Update to .Net 10/SQL 2025

This commit is contained in:
Jon
2026-04-21 16:35:57 -05:00
parent 46735bddd3
commit a9379d308e
50 changed files with 2069 additions and 2179 deletions

View File

@@ -1,232 +1,11 @@
Imports System.Windows.Forms
Imports System.Windows.Forms
Public Class frmEditWork
Inherits OrganLit.BaseEditForm
Private mobjDetailWork As New clsWork
Private m_objHymnTuneNamesHash As Hashtable
Private m_objComposersHash As Hashtable
Private m_objInstrumentationsHash As Hashtable
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents lblHymnTuneName As Windows.Forms.Label
Friend WithEvents cboHymnTuneName As ComboTypeAhead.ComboTypeAhead
Friend WithEvents lblWorkName As Windows.Forms.Label
Friend WithEvents txtWorkName As Windows.Forms.TextBox
Friend WithEvents lblBook As Windows.Forms.Label
Friend WithEvents lblPageNumber As Windows.Forms.Label
Friend WithEvents txtPageNumber As Windows.Forms.TextBox
Friend WithEvents cboBook As Windows.Forms.ComboBox
Friend WithEvents cboComposerName As ComboTypeAhead.ComboTypeAhead
Friend WithEvents lblComposerName As Windows.Forms.Label
Friend WithEvents cboInstrumentationName As ComboTypeAhead.ComboTypeAhead
Friend WithEvents lblInstrumentation As Windows.Forms.Label
Friend WithEvents txtOpusInfo As Windows.Forms.TextBox
Friend WithEvents lblOpusInfo As Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lblWorkName = New Windows.Forms.Label()
Me.txtWorkName = New Windows.Forms.TextBox()
Me.lblBook = New Windows.Forms.Label()
Me.lblHymnTuneName = New Windows.Forms.Label()
Me.cboHymnTuneName = New ComboTypeAhead.ComboTypeAhead()
Me.lblPageNumber = New Windows.Forms.Label()
Me.txtPageNumber = New Windows.Forms.TextBox()
Me.cboBook = New Windows.Forms.ComboBox()
Me.cboComposerName = New ComboTypeAhead.ComboTypeAhead()
Me.lblComposerName = New Windows.Forms.Label()
Me.txtOpusInfo = New Windows.Forms.TextBox()
Me.lblOpusInfo = New Windows.Forms.Label()
Me.cboInstrumentationName = New ComboTypeAhead.ComboTypeAhead()
Me.lblInstrumentation = New Windows.Forms.Label()
Me.fraAddEdit.SuspendLayout()
Me.SuspendLayout()
'
'fraAddEdit
'
Me.fraAddEdit.Controls.Add(Me.cboInstrumentationName)
Me.fraAddEdit.Controls.Add(Me.lblInstrumentation)
Me.fraAddEdit.Controls.Add(Me.txtOpusInfo)
Me.fraAddEdit.Controls.Add(Me.lblOpusInfo)
Me.fraAddEdit.Controls.Add(Me.cboComposerName)
Me.fraAddEdit.Controls.Add(Me.lblComposerName)
Me.fraAddEdit.Controls.Add(Me.cboBook)
Me.fraAddEdit.Controls.Add(Me.txtPageNumber)
Me.fraAddEdit.Controls.Add(Me.lblPageNumber)
Me.fraAddEdit.Controls.Add(Me.cboHymnTuneName)
Me.fraAddEdit.Controls.Add(Me.lblHymnTuneName)
Me.fraAddEdit.Controls.Add(Me.lblBook)
Me.fraAddEdit.Controls.Add(Me.txtWorkName)
Me.fraAddEdit.Controls.Add(Me.lblWorkName)
Me.fraAddEdit.Location = New System.Drawing.Point(12, 381)
Me.fraAddEdit.Size = New System.Drawing.Size(1123, 220)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblWorkName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.txtWorkName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblBook, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblHymnTuneName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.cboHymnTuneName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblPageNumber, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.txtPageNumber, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.cboBook, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblComposerName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.cboComposerName, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblOpusInfo, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.txtOpusInfo, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.lblInstrumentation, 0)
Me.fraAddEdit.Controls.SetChildIndex(Me.cboInstrumentationName, 0)
'
'lblWorkName
'
Me.lblWorkName.Location = New System.Drawing.Point(19, 127)
Me.lblWorkName.Name = "lblWorkName"
Me.lblWorkName.Size = New System.Drawing.Size(115, 18)
Me.lblWorkName.TabIndex = 8
Me.lblWorkName.Text = "Work Name"
'
'txtWorkName
'
Me.txtWorkName.Location = New System.Drawing.Point(134, 127)
Me.txtWorkName.Name = "txtWorkName"
Me.txtWorkName.Size = New System.Drawing.Size(701, 22)
Me.txtWorkName.TabIndex = 9
'
'lblBook
'
Me.lblBook.Location = New System.Drawing.Point(19, 18)
Me.lblBook.Name = "lblBook"
Me.lblBook.Size = New System.Drawing.Size(96, 19)
Me.lblBook.TabIndex = 0
Me.lblBook.Text = "Book"
'
'lblHymnTuneName
'
Me.lblHymnTuneName.Location = New System.Drawing.Point(19, 182)
Me.lblHymnTuneName.Name = "lblHymnTuneName"
Me.lblHymnTuneName.Size = New System.Drawing.Size(115, 19)
Me.lblHymnTuneName.TabIndex = 12
Me.lblHymnTuneName.Text = "Hymn Tune Name"
'
'cboHymnTuneName
'
Me.cboHymnTuneName.Location = New System.Drawing.Point(134, 182)
Me.cboHymnTuneName.Name = "cboHymnTuneName"
Me.cboHymnTuneName.Size = New System.Drawing.Size(346, 24)
Me.cboHymnTuneName.Sorted = True
Me.cboHymnTuneName.TabIndex = 13
'
'lblPageNumber
'
Me.lblPageNumber.Location = New System.Drawing.Point(19, 46)
Me.lblPageNumber.Name = "lblPageNumber"
Me.lblPageNumber.Size = New System.Drawing.Size(96, 19)
Me.lblPageNumber.TabIndex = 2
Me.lblPageNumber.Text = "Page Number"
'
'txtPageNumber
'
Me.txtPageNumber.Location = New System.Drawing.Point(134, 46)
Me.txtPageNumber.Name = "txtPageNumber"
Me.txtPageNumber.Size = New System.Drawing.Size(77, 22)
Me.txtPageNumber.TabIndex = 3
'
'cboBook
'
Me.cboBook.DropDownStyle = Windows.Forms.ComboBoxStyle.DropDownList
Me.cboBook.Location = New System.Drawing.Point(134, 18)
Me.cboBook.Name = "cboBook"
Me.cboBook.Size = New System.Drawing.Size(509, 24)
Me.cboBook.Sorted = True
Me.cboBook.TabIndex = 1
'
'cboComposerName
'
Me.cboComposerName.Location = New System.Drawing.Point(134, 99)
Me.cboComposerName.Name = "cboComposerName"
Me.cboComposerName.Size = New System.Drawing.Size(509, 24)
Me.cboComposerName.Sorted = True
Me.cboComposerName.TabIndex = 7
'
'lblComposerName
'
Me.lblComposerName.Location = New System.Drawing.Point(19, 99)
Me.lblComposerName.Name = "lblComposerName"
Me.lblComposerName.Size = New System.Drawing.Size(115, 19)
Me.lblComposerName.TabIndex = 6
Me.lblComposerName.Text = "Composer Name"
'
'txtOpusInfo
'
Me.txtOpusInfo.Location = New System.Drawing.Point(134, 155)
Me.txtOpusInfo.Name = "txtOpusInfo"
Me.txtOpusInfo.Size = New System.Drawing.Size(250, 22)
Me.txtOpusInfo.TabIndex = 11
'
'lblOpusInfo
'
Me.lblOpusInfo.Location = New System.Drawing.Point(19, 155)
Me.lblOpusInfo.Name = "lblOpusInfo"
Me.lblOpusInfo.Size = New System.Drawing.Size(115, 18)
Me.lblOpusInfo.TabIndex = 10
Me.lblOpusInfo.Text = "Opus Info"
'
'cboInstrumentationName
'
Me.cboInstrumentationName.Location = New System.Drawing.Point(134, 73)
Me.cboInstrumentationName.Name = "cboInstrumentationName"
Me.cboInstrumentationName.Size = New System.Drawing.Size(509, 24)
Me.cboInstrumentationName.Sorted = True
Me.cboInstrumentationName.TabIndex = 5
'
'lblInstrumentation
'
Me.lblInstrumentation.Location = New System.Drawing.Point(19, 73)
Me.lblInstrumentation.Name = "lblInstrumentation"
Me.lblInstrumentation.Size = New System.Drawing.Size(115, 18)
Me.lblInstrumentation.TabIndex = 4
Me.lblInstrumentation.Text = "Instrumentation"
'
'frmEditWork
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
Me.ClientSize = New System.Drawing.Size(1143, 608)
Me.MinimumSize = New System.Drawing.Size(1018, 655)
Me.Name = "frmEditWork"
Me.StartPosition = Windows.Forms.FormStartPosition.Manual
Me.Text = "Edit Work"
Me.fraAddEdit.ResumeLayout(False)
Me.fraAddEdit.PerformLayout()
Me.ResumeLayout(False)
End Sub
#End Region
Protected Overrides Sub LoadExistingItemsList()
Dim lobjWork As clsWork
Dim lobjWorks As System.Collections.Generic.List(Of clsWork)
@@ -364,7 +143,7 @@ Public Class frmEditWork
cboBook.Focus()
End Sub
Protected Overrides Function DetailControlsHaveDifferentDataThanExistingData(ByVal lstvwExistingItem As Windows.Forms.ListViewItem) As Boolean
Protected Overrides Function DetailControlsHaveDifferentDataThanExistingData(ByVal lstvwExistingItem As System.Windows.Forms.ListViewItem) As Boolean
Dim lobjSavedWork As clsWork
Dim lblnReturnValue As Boolean = False
@@ -462,7 +241,7 @@ Public Class frmEditWork
mobjDetailWork = New clsWork
End Sub
Protected Overrides Function LoadExistingDataToDetailControls(ByVal lstvwExistingItem As Windows.Forms.ListViewItem) As Boolean
Protected Overrides Function LoadExistingDataToDetailControls(ByVal lstvwExistingItem As System.Windows.Forms.ListViewItem) As Boolean
Dim lobjWork As clsWork
Dim lblnReturnValue As Boolean = False
lobjWork = CType(lstvwExistingItem.Tag, clsWork)
@@ -497,7 +276,7 @@ Public Class frmEditWork
Return True
End Function
Protected Overrides Function ConfirmOKToDeleteExistingItem(ByVal lstvwItemToDelete As Windows.Forms.ListViewItem) As Boolean
Protected Overrides Function ConfirmOKToDeleteExistingItem(ByVal lstvwItemToDelete As System.Windows.Forms.ListViewItem) As Boolean
Dim lobjWork As clsWork
Dim lstrReferencedBy As String = ""
@@ -509,14 +288,14 @@ Public Class frmEditWork
End If
Dim ldrDialogResult As DialogResult = MessageBox.Show("Are you sure you want to delete work: " + lobjWork.ToString + "?", "Delete confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
If ldrDialogResult = Windows.Forms.DialogResult.No Then
If ldrDialogResult = System.Windows.Forms.DialogResult.No Then
Return False
End If
Return True
End Function
Protected Overrides Function DeleteExistingItem(ByVal lstvwItemToDelete As Windows.Forms.ListViewItem) As Boolean
Protected Overrides Function DeleteExistingItem(ByVal lstvwItemToDelete As System.Windows.Forms.ListViewItem) As Boolean
Dim lobjWork As clsWork
lobjWork = CType(lstvwItemToDelete.Tag, clsWork)
@@ -645,7 +424,7 @@ Public Class frmEditWork
End Function
Protected Overrides Function SaveNewDataForExistingItem(ByVal lstvwExistingItem As Windows.Forms.ListViewItem) As Boolean
Protected Overrides Function SaveNewDataForExistingItem(ByVal lstvwExistingItem As System.Windows.Forms.ListViewItem) As Boolean
Dim lstrErrorString As String = ""
Dim lblnAddedNewComposer As Boolean
Dim lblnAddedNewInstrumentation As Boolean
@@ -755,7 +534,7 @@ Public Class frmEditWork
MyBase.DetailDataHasChanged()
End Sub
Private Sub txtPageNumber_KeyPress(ByVal sender As System.Object, ByVal e As Windows.Forms.KeyPressEventArgs) Handles txtPageNumber.KeyPress
Private Sub txtPageNumber_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPageNumber.KeyPress
If Not MyGlobals.AllowKeypressInNumericTextBox(e.KeyChar) Then
e.Handled = True
End If
@@ -776,4 +555,5 @@ Public Class frmEditWork
m_objHymnTuneNamesHash.Add(objHymnTuneName.HymnTuneName.ToUpper, objHymnTuneName)
End Sub
End Class
End Class