Update to .Net 10/SQL 2025
This commit is contained in:
166
frmEditBook.vb
166
frmEditBook.vb
@@ -1,160 +1,11 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class frmEditBook
|
||||
Inherits OrganLit.BaseEditForm
|
||||
|
||||
Private mobjDetailBook As New clsBook
|
||||
Private m_objComposersHash As Hashtable
|
||||
Private m_objInstrumentationsHash As Hashtable
|
||||
Private m_objPublishersHash 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 lblBookTitle As Windows.Forms.Label
|
||||
Friend WithEvents txtBookTitle As Windows.Forms.TextBox
|
||||
Friend WithEvents lblComposer As Windows.Forms.Label
|
||||
Friend WithEvents cboComposer As ComboTypeAhead.ComboTypeAhead
|
||||
Friend WithEvents lblPublisher As Windows.Forms.Label
|
||||
Friend WithEvents cboPublisher As ComboTypeAhead.ComboTypeAhead
|
||||
Friend WithEvents cboInstrumentation As ComboTypeAhead.ComboTypeAhead
|
||||
Friend WithEvents lblInstrumentation As Windows.Forms.Label
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.lblBookTitle = New Windows.Forms.Label
|
||||
Me.txtBookTitle = New Windows.Forms.TextBox
|
||||
Me.lblComposer = New Windows.Forms.Label
|
||||
Me.cboComposer = New ComboTypeAhead.ComboTypeAhead
|
||||
Me.lblPublisher = New Windows.Forms.Label
|
||||
Me.cboPublisher = New ComboTypeAhead.ComboTypeAhead
|
||||
Me.cboInstrumentation = New ComboTypeAhead.ComboTypeAhead
|
||||
Me.lblInstrumentation = New Windows.Forms.Label
|
||||
Me.fraAddEdit.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'fraAddEdit
|
||||
'
|
||||
Me.fraAddEdit.Controls.Add(Me.cboInstrumentation)
|
||||
Me.fraAddEdit.Controls.Add(Me.lblInstrumentation)
|
||||
Me.fraAddEdit.Controls.Add(Me.cboPublisher)
|
||||
Me.fraAddEdit.Controls.Add(Me.lblPublisher)
|
||||
Me.fraAddEdit.Controls.Add(Me.cboComposer)
|
||||
Me.fraAddEdit.Controls.Add(Me.lblComposer)
|
||||
Me.fraAddEdit.Controls.Add(Me.txtBookTitle)
|
||||
Me.fraAddEdit.Controls.Add(Me.lblBookTitle)
|
||||
Me.fraAddEdit.Location = New System.Drawing.Point(10, 438)
|
||||
Me.fraAddEdit.Size = New System.Drawing.Size(1064, 142)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.lblBookTitle, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.txtBookTitle, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.lblComposer, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.cboComposer, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.lblPublisher, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.cboPublisher, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.lblInstrumentation, 0)
|
||||
Me.fraAddEdit.Controls.SetChildIndex(Me.cboInstrumentation, 0)
|
||||
'
|
||||
'lblBookTitle
|
||||
'
|
||||
Me.lblBookTitle.Location = New System.Drawing.Point(16, 24)
|
||||
Me.lblBookTitle.Name = "lblBookTitle"
|
||||
Me.lblBookTitle.Size = New System.Drawing.Size(96, 16)
|
||||
Me.lblBookTitle.TabIndex = 3
|
||||
Me.lblBookTitle.Text = "Book Title"
|
||||
'
|
||||
'txtBookTitle
|
||||
'
|
||||
Me.txtBookTitle.Location = New System.Drawing.Point(109, 24)
|
||||
Me.txtBookTitle.Name = "txtBookTitle"
|
||||
Me.txtBookTitle.Size = New System.Drawing.Size(424, 20)
|
||||
Me.txtBookTitle.TabIndex = 4
|
||||
'
|
||||
'lblComposer
|
||||
'
|
||||
Me.lblComposer.Location = New System.Drawing.Point(16, 48)
|
||||
Me.lblComposer.Name = "lblComposer"
|
||||
Me.lblComposer.Size = New System.Drawing.Size(80, 16)
|
||||
Me.lblComposer.TabIndex = 5
|
||||
Me.lblComposer.Text = "Composer"
|
||||
'
|
||||
'cboComposer
|
||||
'
|
||||
Me.cboComposer.Location = New System.Drawing.Point(109, 48)
|
||||
Me.cboComposer.Name = "cboComposer"
|
||||
Me.cboComposer.Size = New System.Drawing.Size(288, 21)
|
||||
Me.cboComposer.Sorted = True
|
||||
Me.cboComposer.TabIndex = 6
|
||||
'
|
||||
'lblPublisher
|
||||
'
|
||||
Me.lblPublisher.Location = New System.Drawing.Point(16, 107)
|
||||
Me.lblPublisher.Name = "lblPublisher"
|
||||
Me.lblPublisher.Size = New System.Drawing.Size(80, 16)
|
||||
Me.lblPublisher.TabIndex = 9
|
||||
Me.lblPublisher.Text = "Publisher"
|
||||
'
|
||||
'cboPublisher
|
||||
'
|
||||
Me.cboPublisher.Location = New System.Drawing.Point(109, 107)
|
||||
Me.cboPublisher.Name = "cboPublisher"
|
||||
Me.cboPublisher.Size = New System.Drawing.Size(288, 21)
|
||||
Me.cboPublisher.Sorted = True
|
||||
Me.cboPublisher.TabIndex = 10
|
||||
'
|
||||
'cboInstrumentation
|
||||
'
|
||||
Me.cboInstrumentation.Location = New System.Drawing.Point(109, 80)
|
||||
Me.cboInstrumentation.Name = "cboInstrumentation"
|
||||
Me.cboInstrumentation.Size = New System.Drawing.Size(288, 21)
|
||||
Me.cboInstrumentation.Sorted = True
|
||||
Me.cboInstrumentation.TabIndex = 8
|
||||
'
|
||||
'lblInstrumentation
|
||||
'
|
||||
Me.lblInstrumentation.Location = New System.Drawing.Point(16, 80)
|
||||
Me.lblInstrumentation.Name = "lblInstrumentation"
|
||||
Me.lblInstrumentation.Size = New System.Drawing.Size(96, 16)
|
||||
Me.lblInstrumentation.TabIndex = 7
|
||||
Me.lblInstrumentation.Text = "Instrumentation"
|
||||
'
|
||||
'frmEditBook
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(1080, 586)
|
||||
Me.Name = "frmEditBook"
|
||||
Me.StartPosition = Windows.Forms.FormStartPosition.Manual
|
||||
Me.Text = "Edit Book"
|
||||
Me.fraAddEdit.ResumeLayout(False)
|
||||
Me.fraAddEdit.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Overrides Sub LoadExistingItemsList()
|
||||
Dim lobjBook As clsBook
|
||||
Dim lobjBooks As System.Collections.Generic.List(Of clsBook)
|
||||
@@ -247,7 +98,7 @@ Public Class frmEditBook
|
||||
txtBookTitle.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 lobjSavedBook As clsBook
|
||||
Dim lblnReturnValue As Boolean = False
|
||||
|
||||
@@ -312,7 +163,7 @@ Public Class frmEditBook
|
||||
mobjDetailBook = New clsBook
|
||||
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 lobjBook As clsBook
|
||||
Dim lblnReturnValue As Boolean = False
|
||||
lobjBook = CType(lstvwExistingItem.Tag, clsBook)
|
||||
@@ -340,7 +191,7 @@ Public Class frmEditBook
|
||||
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 lobjBook As clsBook
|
||||
Dim lstrReferencedBy As String = ""
|
||||
|
||||
@@ -352,14 +203,14 @@ Public Class frmEditBook
|
||||
End If
|
||||
|
||||
Dim ldrDialogResult As DialogResult = MessageBox.Show("Are you sure you want to delete book: " + lobjBook.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 lobjBook As clsBook
|
||||
lobjBook = CType(lstvwItemToDelete.Tag, clsBook)
|
||||
|
||||
@@ -476,7 +327,7 @@ Public Class frmEditBook
|
||||
|
||||
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 lblnAddedComposer As Boolean
|
||||
Dim lblnAddedInstrumentation As Boolean
|
||||
@@ -585,4 +436,5 @@ Public Class frmEditBook
|
||||
m_objPublishersHash.Add(objPublisher.PublisherName.ToUpper, objPublisher)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user