diff --git a/.gitignore b/.gitignore
index a3021f4..b3aa5bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -147,3 +147,4 @@ BSMyLoadersLog/obj/Debug/BSMyLoadersLog.vbprojAssemblyReference.cache
.vs/BSMyLoadersLog/v16/TestStore/0/000.testlog
.vs/BSMyLoadersLog/v16/TestStore/0/testlog.manifest
/packages
+*.ldb
diff --git a/BSMyLoadersLog/AboutBox1.Designer.vb b/BSMyLoadersLog/AboutBox1.Designer.vb
index ca0ba98..b0d4bc1 100644
--- a/BSMyLoadersLog/AboutBox1.Designer.vb
+++ b/BSMyLoadersLog/AboutBox1.Designer.vb
@@ -40,15 +40,15 @@ Partial Class AboutBox1
Me.LabelCompanyName = New System.Windows.Forms.Label()
Me.TextBoxDescription = New System.Windows.Forms.TextBox()
Me.OKButton = New System.Windows.Forms.Button()
- Me.TableLayoutPanel.SuspendLayout()
- CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
+ Me.TableLayoutPanel.SuspendLayout
+ CType(Me.LogoPictureBox,System.ComponentModel.ISupportInitialize).BeginInit
+ Me.SuspendLayout
'
'TableLayoutPanel
'
Me.TableLayoutPanel.ColumnCount = 2
- Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.0!))
- Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.0!))
+ Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33!))
+ Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67!))
Me.TableLayoutPanel.Controls.Add(Me.LogoPictureBox, 0, 0)
Me.TableLayoutPanel.Controls.Add(Me.LabelProductName, 1, 0)
Me.TableLayoutPanel.Controls.Add(Me.LabelVersion, 1, 1)
@@ -60,26 +60,26 @@ Partial Class AboutBox1
Me.TableLayoutPanel.Location = New System.Drawing.Point(9, 9)
Me.TableLayoutPanel.Name = "TableLayoutPanel"
Me.TableLayoutPanel.RowCount = 6
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
- Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!))
+ Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
Me.TableLayoutPanel.Size = New System.Drawing.Size(396, 258)
Me.TableLayoutPanel.TabIndex = 0
'
'LogoPictureBox
'
Me.LogoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill
- Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"), System.Drawing.Image)
+ Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"),System.Drawing.Image)
Me.LogoPictureBox.Location = New System.Drawing.Point(3, 3)
Me.LogoPictureBox.Name = "LogoPictureBox"
Me.TableLayoutPanel.SetRowSpan(Me.LogoPictureBox, 6)
Me.LogoPictureBox.Size = New System.Drawing.Size(124, 252)
Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.LogoPictureBox.TabIndex = 0
- Me.LogoPictureBox.TabStop = False
+ Me.LogoPictureBox.TabStop = false
'
'LabelProductName
'
@@ -134,18 +134,18 @@ Partial Class AboutBox1
Me.TextBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill
Me.TextBoxDescription.Location = New System.Drawing.Point(136, 103)
Me.TextBoxDescription.Margin = New System.Windows.Forms.Padding(6, 3, 3, 3)
- Me.TextBoxDescription.Multiline = True
+ Me.TextBoxDescription.Multiline = true
Me.TextBoxDescription.Name = "TextBoxDescription"
- Me.TextBoxDescription.ReadOnly = True
+ Me.TextBoxDescription.ReadOnly = true
Me.TextBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.TextBoxDescription.Size = New System.Drawing.Size(257, 123)
Me.TextBoxDescription.TabIndex = 0
- Me.TextBoxDescription.TabStop = False
+ Me.TextBoxDescription.TabStop = false
Me.TextBoxDescription.Text = resources.GetString("TextBoxDescription.Text")
'
'OKButton
'
- Me.OKButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.OKButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.OKButton.Location = New System.Drawing.Point(318, 232)
Me.OKButton.Name = "OKButton"
@@ -155,24 +155,24 @@ Partial Class AboutBox1
'
'AboutBox1
'
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.OKButton
Me.ClientSize = New System.Drawing.Size(414, 276)
Me.Controls.Add(Me.TableLayoutPanel)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
- Me.MaximizeBox = False
- Me.MinimizeBox = False
+ Me.MaximizeBox = false
+ Me.MinimizeBox = false
Me.Name = "AboutBox1"
Me.Padding = New System.Windows.Forms.Padding(9)
- Me.ShowInTaskbar = False
+ Me.ShowInTaskbar = false
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "About My Loaders Log"
- Me.TableLayoutPanel.ResumeLayout(False)
- Me.TableLayoutPanel.PerformLayout()
- CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
+ Me.TableLayoutPanel.ResumeLayout(false)
+ Me.TableLayoutPanel.PerformLayout
+ CType(Me.LogoPictureBox,System.ComponentModel.ISupportInitialize).EndInit
+ Me.ResumeLayout(false)
- End Sub
+End Sub
End Class
diff --git a/BSMyLoadersLog/AboutBox1.vb b/BSMyLoadersLog/AboutBox1.vb
index 7877643..2a01ce1 100644
--- a/BSMyLoadersLog/AboutBox1.vb
+++ b/BSMyLoadersLog/AboutBox1.vb
@@ -1,4 +1,4 @@
-Imports BSMyLoadersLog.LoadersClass
+
'''
''' Class AboutBox1. This class cannot be inherited.
''' Implements the
@@ -27,7 +27,8 @@ Public NotInheritable Class AboutBox1
' properties dialog (under the "Project" menu).
LabelProductName.Text = My.Application.Info.ProductName
Dim dbVersion As Long = BurnSoft.Applications.MLL.Database.GetDatabaseVersion(DatabasePath, errOut)
- LabelVersion.Text = String.Format("App Version {0}", Application.ProductVersion.ToString) & " , " & String.Format("DB Version {0}", dbVersion)
+ LabelVersion.Text = String.Format("App Version {0}", Application.ProductVersion.ToString) &
+ " , " & String.Format("DB Version {0}", dbVersion)
LabelCopyright.Text = My.Application.Info.Copyright
LabelCompanyName.Text = My.Application.Info.CompanyName
TextBoxDescription.Text = My.Application.Info.Description
diff --git a/BSMyLoadersLog/Adding/frmAddBullets.vb b/BSMyLoadersLog/Adding/frmAddBullets.vb
index bfd5572..7ef41d7 100644
--- a/BSMyLoadersLog/Adding/frmAddBullets.vb
+++ b/BSMyLoadersLog/Adding/frmAddBullets.vb
@@ -8,9 +8,9 @@ Namespace Adding
'''
''' Class FrmAddBullets.
- ''' Implements the
+ ''' Implements the
'''
- '''
+ '''
Public Class FrmAddBullets
'''
''' From view
@@ -23,7 +23,7 @@ Namespace Adding
'''
''' The bullet id
'''
- Public Bid As Long
+ Public BulletId As Long
'''
''' The error out
'''
@@ -34,7 +34,7 @@ Namespace Adding
Sub LoadData()
Try
Dim values As List(Of BulletListings) = BulletsInventory.GetDetails(DatabasePath,
- Bid, _errOut)
+ BulletId, _errOut)
if _errOut.Length > 0 Then Throw New Exception(_errOut)
For Each o As BulletListings In values
txtManu.Text = o.Manufacturer
@@ -61,7 +61,7 @@ Namespace Adding
'''
''' The source of the event.
''' The instance containing the event data.
- Private Sub frmAddBullets_Load(ByVal sender As System.Object, ByVal e As EventArgs) Handles MyBase.Load
+ Private Sub frmAddBullets_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
General_Ammunition_TypeTableAdapter.Fill(MLLDataSet.General_Ammunition_Type)
Try
List_CalibersTableAdapter.Fill(MLLDataSet.List_Calibers)
@@ -75,8 +75,8 @@ Namespace Adding
''' Handles the Click event of the btnCancel control.
'''
''' The source of the event.
- ''' The instance containing the event data.
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnCancel.Click
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
Close()
End Sub
'''
@@ -108,8 +108,8 @@ Namespace Adding
''' Handles the Click event of the btnAdd control.
'''
''' The source of the event.
- ''' The instance containing the event data.
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnAdd.Click
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
Try
Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
@@ -135,7 +135,7 @@ Namespace Adding
strSecDia, strPartNo, strBc, intBt, strQty, dbPrice, cal, _errOut) Then
Throw new Exception(_errOut)
End If
- If FromView Then Call frmView_List_Bullets.LoadData()
+ If FromView Then Call FrmViewListBullets.LoadData()
Close()
Catch ex As Exception
Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Adding/frmAddBushing_Powder.vb b/BSMyLoadersLog/Adding/frmAddBushing_Powder.vb
index 3afc687..679d022 100644
--- a/BSMyLoadersLog/Adding/frmAddBushing_Powder.vb
+++ b/BSMyLoadersLog/Adding/frmAddBushing_Powder.vb
@@ -6,9 +6,9 @@ Namespace Adding
'''
''' Class FrmAddBushingPowder.
- ''' Implements the
+ ''' Implements the
'''
- '''
+ '''
Public Class FrmAddBushingPowder
'''
''' The error out
@@ -35,8 +35,8 @@ Namespace Adding
''' Handles the Load event of the frmAddChargeBushing control.
'''
''' The source of the event.
- ''' The instance containing the event data.
- Private Sub frmAddChargeBushing_Load(ByVal sender As System.Object, ByVal e As EventArgs) Handles MyBase.Load
+ ''' The instance containing the event data.
+ Private Sub frmAddChargeBushing_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Try
Call PreloadData()
Catch ex As Exception
@@ -48,7 +48,7 @@ Namespace Adding
'''
''' The source of the event.
''' The instance containing the event data.
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
Close()
End Sub
'''
@@ -92,7 +92,7 @@ Namespace Adding
'''
''' The source of the event.
''' The instance containing the event data.
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
Call SaveData()
End Sub
'''
@@ -115,7 +115,7 @@ Namespace Adding
''' Handles the Enter event of the txtName control.
'''
''' The source of the event.
- ''' The instance containing the event data.
+ ''' The instance containing the event data.
Private Sub txtName_Enter(ByVal sender As Object, ByVal e As EventArgs) Handles txtName.Enter
txtName.SelectAll()
End Sub
@@ -123,7 +123,7 @@ Namespace Adding
''' Handles the Enter event of the txtPowderName control.
'''
''' The source of the event.
- ''' The instance containing the event data.
+ ''' The instance containing the event data.
Private Sub txtPowderName_Enter(ByVal sender As Object, ByVal e As EventArgs) Handles txtPowderName.Enter
txtPowderName.SelectAll()
End Sub
diff --git a/BSMyLoadersLog/Adding/frmAddBushing_Shot.vb b/BSMyLoadersLog/Adding/frmAddBushing_Shot.vb
index a2d0744..42b2d6a 100644
--- a/BSMyLoadersLog/Adding/frmAddBushing_Shot.vb
+++ b/BSMyLoadersLog/Adding/frmAddBushing_Shot.vb
@@ -6,25 +6,25 @@ Namespace Adding
'''
''' Class frmAddBushing_Shot.
- ''' Implements the
+ ''' Implements the
'''
- '''
+ '''
Public Class FrmAddBushingShot
'''
''' The error out
'''
- Private errOut as String
+ Private _errOut as String
'''
''' Pres the load data.
'''
Sub PreLoadData()
Try
- txtCharge.AutoCompleteCustomSource = ConfigShotgun.BushingShotCharge(DatabasePath, errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
- txtManu.AutoCompleteCustomSource = ConfigShotgun.BushingShotManufacturer(DatabasePath, errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
- txtName.AutoCompleteCustomSource = ConfigShotgun.BushingShotName(DatabasePath, errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
+ txtCharge.AutoCompleteCustomSource = ConfigShotgun.BushingShotCharge(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtManu.AutoCompleteCustomSource = ConfigShotgun.BushingShotManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = ConfigShotgun.BushingShotName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
Catch ex As Exception
Call LogError(Name, "PreLoadData", Err.Number, ex.Message.ToString)
End Try
@@ -43,8 +43,8 @@ Namespace Adding
''' Handles the Click event of the btnCancel control.
'''
''' The source of the event.
- ''' The instance containing the event data.
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnCancel.Click
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
Close()
End Sub
'''
@@ -64,7 +64,7 @@ Namespace Adding
If Not GeneralHelpers.IsRequired(sCharge, "Charge Amount",
Text) Then Exit Sub
If Not ShotgunShotInventory.Add(DatabasePath, manu, sName, sCharge,
- sType, errOut) Then Throw New Exception(errOut)
+ sType, _errOut) Then Throw New Exception(_errOut)
Call ClearFields()
Catch ex As Exception
Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
@@ -75,7 +75,7 @@ Namespace Adding
'''
''' The source of the event.
''' The instance containing the event data.
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
Call SaveData()
End Sub
'''
@@ -98,7 +98,7 @@ Namespace Adding
''' Handles the Enter event of the txtName control.
'''
''' The source of the event.
- ''' The instance containing the event data.
+ ''' The instance containing the event data.
Private Sub txtName_Enter(ByVal sender As Object, ByVal e As EventArgs) Handles txtName.Enter
txtName.SelectAll()
End Sub
@@ -107,7 +107,7 @@ Namespace Adding
'''
''' The source of the event.
''' The instance containing the event data.
- Private Sub frmAddBushing_Shot_Load(ByVal sender As System.Object, ByVal e As EventArgs) Handles MyBase.Load
+ Private Sub frmAddBushing_Shot_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Call PreLoadData()
End Sub
End Class
diff --git a/BSMyLoadersLog/Adding/frmAddCaliberToCollection.vb b/BSMyLoadersLog/Adding/frmAddCaliberToCollection.vb
index 52b85b5..d82fd31 100644
--- a/BSMyLoadersLog/Adding/frmAddCaliberToCollection.vb
+++ b/BSMyLoadersLog/Adding/frmAddCaliberToCollection.vb
@@ -5,9 +5,9 @@ Imports BurnSoft.Applications.MLL.Inventory
Namespace Adding
'''
''' Class FrmAddCaliberToCollection.
- ''' Implements the
+ ''' Implements the
'''
- '''
+ '''
Public Class FrmAddCaliberToCollection
'''
''' The error out
diff --git a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_CFG.vb b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_CFG.vb
index d6873a0..e83fffe 100644
--- a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_CFG.vb
+++ b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_CFG.vb
@@ -1,17 +1,18 @@
-Imports System.Data.Odbc
-Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.AutoFill
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
Imports BurnSoft.Applications.MLL.LoadersLog
Imports BurnSoft.Applications.MLL.Types
Namespace Adding
'''
''' Class FrmAddDataSheetRiflePistolsCfg.
- ''' Implements the
+ ''' Implements the
'''
- '''
+ '''
Public Class FrmAddDataSheetRiflePistolsCfg
'''
''' From view
@@ -24,7 +25,7 @@ Namespace Adding
'''
''' The error out
'''
- Private _errOut as String
+ Private _errOut As String
'''
''' Loads the automatic fill.
'''
@@ -32,11 +33,11 @@ Namespace Adding
Sub LoadAutoFill()
Try
txtGroup.AutoCompleteCustomSource = ConfigMetalic.GroupSize(DatabasePath, _errOut)
- if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
txtCon.AutoCompleteCustomSource = ConfigMetalic.Conditions(DatabasePath, _errOut)
- if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
txtLen.AutoCompleteCustomSource = ConfigMetalic.TotalLenght(DatabasePath, _errOut)
- if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
Catch ex As Exception
Call LogError(Name, "LoadAutoFill", Err.Number, ex.Message.ToString)
End Try
@@ -46,72 +47,99 @@ Namespace Adding
'''
Sub SaveData()
Try
- Dim lngFid As Long = cmbFirearm.SelectedValue
- Dim strFireArm As String = cmbFirearm.Text
- Dim strDateTested As String = dtpTested.Value
- Dim strGroup As String = GeneralHelpers.FluffContent(txtGroup.Text)
- Dim lngNumShots As Integer = nudShots.Value
- Dim lngYards As Integer = nudYards.Value
+ Dim firearmId As Long = cmbFirearm.SelectedValue
+ Dim firearmName As String = cmbFirearm.Text
+ Dim dateCreated As String = dtpTested.Value
+ Dim groupSize As String = GeneralHelpers.FluffContent(txtGroup.Text)
+ Dim numberOfShots As Integer = nudShots.Value
+ Dim yards As Integer = nudYards.Value
Dim configId As Long = cmbConfig.SelectedValue
Dim configName As String = cmbConfig.Text
- Dim strCond As String = GeneralHelpers.FluffContent(txtCon.Text)
- Dim strLen As String = GeneralHelpers.FluffContent(txtLen.Text)
- Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
- Dim strBarLen As String = ""
- Dim powName As String = ""
- Dim powWei As Double = 0
- Dim powManu As String = ""
- Dim bulManu As String = ""
- Dim bulName As String = ""
- Dim bulWei As String = ""
- Dim priManu As String = ""
- Dim priName As String = ""
+ Dim condition As String = GeneralHelpers.FluffContent(txtCon.Text)
+ Dim oal As String = GeneralHelpers.FluffContent(txtLen.Text)
+ Dim notes As String = GeneralHelpers.FluffContent(txtNotes.Text)
+ Dim barrelLenght As String = ""
+ Dim powderName As String = ""
+ Dim powderWeight As Double = 0
+ Dim powderManufacturer As String = ""
+ Dim bulletManufacturer As String = ""
+ Dim bulletName As String = ""
+ Dim bulletWeight As String = ""
+ Dim primerManufacturer As String = ""
+ Dim primerName As String = ""
Dim caseName As String = ""
Dim caseManu As String = ""
Dim caseStatus As String = ""
Dim caliber As String = ""
- Dim obj As New BSDatabase
- Dim objIm As New InventoryMath
- Dim objGf As New GlobalFunctions
- Dim prefferedPowderId As Long = objIm.GetPrefNSGPowderID(configId, powWei)
- Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", "", strBarLen)
- Dim sql As String = "SELECT * from Config_List_Data_NSG where CLNID=" & configId
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- caliber = objIm.GetCaliber(rs("CALID"))
- Call objIm.LoadBulletInfo(rs("BID"), bulManu, bulName, "", _
- bulWei)
- Call objIm.LoadPrimerInfo(rs("PRID"), priManu, priName)
- Call objIm.LoadCaseInfo(rs("CAID"), caseManu, caseName, "", caseStatus)
- Call objIm.GetPowderDetails(prefferedPowderId, powManu, powName)
- End While
- rs.Close()
+ Dim prefferedPowderId As Long = ConfigListDataPowder.GetDefaultPowderId(DatabasePath, configId, powderWeight, _errOut)
+
+ Dim lst As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, CInt(firearmId), _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As FirearmCollection In lst
+ barrelLenght = o.Barrel
+ Next
+
+ Dim configList As List(Of ConfigListDataMetalicData) = ConfigListDataMetalic.GetDetails(
+ DatabasePath, configId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim bulletId As Long
+ Dim primerId As Long
+ Dim caseId As Long
+ For Each o As ConfigListDataMetalicData In configList
+ caliber = CaliberInventory.GetName(DatabasePath, o.CaliberId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ bulletId = o.BulletId
+ primerId = o.PrimerId
+ caseId = o.CaseId
+ Next
+
+ Dim bulletList As List(Of BulletListings) = BulletsInventory.GetDetails(DatabasePath, bulletId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As BulletListings In bulletList
+ bulletManufacturer = o.Manufacturer
+ bulletName = o.Name
+ bulletWeight = o.Weight
+ Next
+
+ Dim primerList As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, primerId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As PrimerListings In primerList
+ primerManufacturer = o.Manufacturer
+ primerName = o.Name
+ Next
+
+ Dim caseList As List(Of CaseListings) = CaseInventory.GetDetails(DatabasePath, caseId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As CaseListings In caseList
+ caseManu = o.Manufacturer
+ caseName = o.Name
+ caseStatus = o.TimesUsed
+ Next
+
+ Dim powderList as List(Of PowderListing) = PowderInventory.GetDetails(DatabasePath, prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As PowderListing In powderList
+ powderManufacturer = o.Manufacturer
+ powderName = o.Name
+ Next
If CLng(caseStatus) = 0 Then
caseStatus = "(NEW)"
Else
caseStatus = "(USED)"
End If
- Dim powderDetails as String = GeneralHelpers.FluffContent(powName & " - " & powWei & " - " & powManu)
- Dim bulletDetails As String = GeneralHelpers.FluffContent(bulManu & " " & bulName) & " (" & bulWei & ")"
- Dim primerDetails As String = priManu & " " & priName
+ Dim powderDetails As String = GeneralHelpers.FluffContent(powderName & " - " & powderWeight & " - " & powderManufacturer)
+ Dim bulletDetails As String = GeneralHelpers.FluffContent(bulletManufacturer & " " & bulletName) & " (" & bulletWeight & ")"
+ Dim primerDetails As String = primerManufacturer & " " & primerName
Dim caseDetails As String = caseManu & " " & caseName & " " & caseStatus
- If Not LoadersLogMetallic.Add(DatabasePath, firearmId := lngFid, dateCreated := strDateTested,
- yards := lngYards, groupSize := strGroup, numberOfShots := lngNumShots,
- powderDetails := powderDetails, bulletDetails := bulletDetails,
- primerDetails := primerDetails, caseDetails := caseDetails,
- condition := strCond, oal := strLen, notes := strNotes,
- configName := configName, FirearmName := strFireArm,
- caliber := caliber, BarrelLenght := strBarLen, _errOut) Then
- Throw New Exception(_errOut)
- End If
+ If Not LoadersLogMetallic.Add(DatabasePath, firearmId, dateCreated, yards, groupSize, numberOfShots,
+ powderDetails, bulletDetails, primerDetails, caseDetails,
+ condition, oal, notes, configName, firearmName,
+ caliber,barrelLenght, _errOut) Then Throw New Exception(_errOut)
MsgBox("Information was saved to the Loaders Log!")
- If FromView Then Call frmViewDataSheet_RiflePistols.LoadDataCur()
+ If FromView Then Call FrmViewDataSheetRiflePistols.LoadDataCur()
Close()
Catch ex As Exception
Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
@@ -156,15 +184,15 @@ Namespace Adding
Dim lngFid As Integer = cmbFirearm.SelectedValue
Dim strCal As String = ""
Dim values As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, lngFid, _errOut)
- if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
For Each o As FirearmCollection In values
strCal = o.Caliber
Next
- Dim calId As Long = GeneralFunctions.GetCaliberID(DatabasePath,strCal, _errOut)
- if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim calId As Long = GeneralFunctions.GetCaliberID(DatabasePath, strCal, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
ConfigList_SimpleTableAdapter.FillBy_Caliber(MLLDataSet.ConfigList_Simple, calId)
Catch ex As Exception
- Call LogError(Name, "UpdateConfigList", Err.Number,
+ Call LogError(Name, "UpdateConfigList", Err.Number,
ex.Message.ToString)
End Try
End Sub
@@ -185,4 +213,4 @@ Namespace Adding
End Sub
End Class
-End NameSpace
\ No newline at end of file
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.Designer.vb b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.Designer.vb
index c6500c8..3086ab9 100644
--- a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.Designer.vb
@@ -1,438 +1,440 @@
- _
-Partial Class FrmAddDataSheetRiflePistolsMan
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddDataSheetRiflePistolsMan
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmAddDataSheetRiflePistolsMan))
- Me.nudYards = New System.Windows.Forms.NumericUpDown
- Me.Label9 = New System.Windows.Forms.Label
- Me.nudShots = New System.Windows.Forms.NumericUpDown
- Me.Label8 = New System.Windows.Forms.Label
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnAdd = New System.Windows.Forms.Button
- Me.txtNotes = New System.Windows.Forms.TextBox
- Me.txtLen = New System.Windows.Forms.TextBox
- Me.txtCon = New System.Windows.Forms.TextBox
- Me.txtGroup = New System.Windows.Forms.TextBox
- Me.dtpTested = New System.Windows.Forms.DateTimePicker
- Me.cmbFirearm = New System.Windows.Forms.ComboBox
- Me.LoadersLogFirearmsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.Label7 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.Loaders_Log_FirearmsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label10 = New System.Windows.Forms.Label
- Me.Label11 = New System.Windows.Forms.Label
- Me.Label12 = New System.Windows.Forms.Label
- Me.Label13 = New System.Windows.Forms.Label
- Me.Label14 = New System.Windows.Forms.Label
- Me.txtPowName = New System.Windows.Forms.TextBox
- Me.txtPowWei = New System.Windows.Forms.TextBox
- Me.txtPowManu = New System.Windows.Forms.TextBox
- Me.txtBullet = New System.Windows.Forms.TextBox
- Me.txtPrimer = New System.Windows.Forms.TextBox
- Me.txtCase = New System.Windows.Forms.TextBox
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.nudYards, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.nudShots, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'nudYards
- '
- Me.nudYards.Location = New System.Drawing.Point(132, 69)
- Me.nudYards.Maximum = New Decimal(New Integer() {5000, 0, 0, 0})
- Me.nudYards.Name = "nudYards"
- Me.nudYards.Size = New System.Drawing.Size(200, 20)
- Me.nudYards.TabIndex = 3
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(12, 71)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(81, 13)
- Me.Label9.TabIndex = 38
- Me.Label9.Text = "Yards tested at:"
- '
- 'nudShots
- '
- Me.nudShots.Location = New System.Drawing.Point(132, 123)
- Me.nudShots.Maximum = New Decimal(New Integer() {1000, 0, 0, 0})
- Me.nudShots.Name = "nudShots"
- Me.nudShots.Size = New System.Drawing.Size(200, 20)
- Me.nudShots.TabIndex = 5
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(12, 125)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(89, 13)
- Me.Label8.TabIndex = 36
- Me.Label8.Text = "Number of Shots:"
- '
- 'btnCancel
- '
- Me.btnCancel.Location = New System.Drawing.Point(257, 463)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 16
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(15, 463)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 15
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'txtNotes
- '
- Me.txtNotes.Location = New System.Drawing.Point(15, 371)
- Me.txtNotes.Multiline = True
- Me.txtNotes.Name = "txtNotes"
- Me.txtNotes.Size = New System.Drawing.Size(317, 84)
- Me.txtNotes.TabIndex = 14
- '
- 'txtLen
- '
- Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtLen.Location = New System.Drawing.Point(132, 330)
- Me.txtLen.Name = "txtLen"
- Me.txtLen.Size = New System.Drawing.Size(200, 20)
- Me.txtLen.TabIndex = 13
- '
- 'txtCon
- '
- Me.txtCon.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtCon.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtCon.Location = New System.Drawing.Point(132, 304)
- Me.txtCon.Name = "txtCon"
- Me.txtCon.Size = New System.Drawing.Size(200, 20)
- Me.txtCon.TabIndex = 12
- '
- 'txtGroup
- '
- Me.txtGroup.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtGroup.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtGroup.Location = New System.Drawing.Point(132, 95)
- Me.txtGroup.Name = "txtGroup"
- Me.txtGroup.Size = New System.Drawing.Size(200, 20)
- Me.txtGroup.TabIndex = 4
- '
- 'dtpTested
- '
- Me.dtpTested.Location = New System.Drawing.Point(132, 42)
- Me.dtpTested.Name = "dtpTested"
- Me.dtpTested.Size = New System.Drawing.Size(200, 20)
- Me.dtpTested.TabIndex = 2
- '
- 'cmbFirearm
- '
- Me.cmbFirearm.DataSource = Me.LoadersLogFirearmsBindingSource
- Me.cmbFirearm.DisplayMember = "FullName"
- Me.cmbFirearm.FormattingEnabled = True
- Me.cmbFirearm.Location = New System.Drawing.Point(132, 15)
- Me.cmbFirearm.Name = "cmbFirearm"
- Me.cmbFirearm.Size = New System.Drawing.Size(200, 21)
- Me.cmbFirearm.TabIndex = 1
- Me.cmbFirearm.ValueMember = "ID"
- '
- 'LoadersLogFirearmsBindingSource
- '
- Me.LoadersLogFirearmsBindingSource.DataMember = "Loaders_Log_Firearms"
- Me.LoadersLogFirearmsBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(12, 355)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(35, 13)
- Me.Label7.TabIndex = 26
- Me.Label7.Text = "Notes"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 333)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(70, 13)
- Me.Label6.TabIndex = 25
- Me.Label6.Text = "Total Length:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 307)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(59, 13)
- Me.Label5.TabIndex = 24
- Me.Label5.Text = "Conditions:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 98)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(103, 13)
- Me.Label3.TabIndex = 22
- Me.Label3.Text = "Group size or Score:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 46)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(65, 13)
- Me.Label2.TabIndex = 21
- Me.Label2.Text = "Date tested:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 18)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(98, 13)
- Me.Label1.TabIndex = 20
- Me.Label1.Text = "Firearm tested with:"
- '
- 'Loaders_Log_FirearmsTableAdapter
- '
- Me.Loaders_Log_FirearmsTableAdapter.ClearBeforeFill = True
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 152)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(77, 13)
- Me.Label4.TabIndex = 40
- Me.Label4.Text = "Powder Name:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(12, 177)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(123, 13)
- Me.Label10.TabIndex = 41
- Me.Label10.Text = "Weight of Powder Used:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(12, 203)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(112, 13)
- Me.Label11.TabIndex = 42
- Me.Label11.Text = "Powder Manufacturer:"
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(12, 229)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(36, 13)
- Me.Label12.TabIndex = 43
- Me.Label12.Text = "Bullet:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(12, 255)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(39, 13)
- Me.Label13.TabIndex = 44
- Me.Label13.Text = "Primer:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(12, 281)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(34, 13)
- Me.Label14.TabIndex = 45
- Me.Label14.Text = "Case:"
- '
- 'txtPowName
- '
- Me.txtPowName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPowName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPowName.Location = New System.Drawing.Point(132, 149)
- Me.txtPowName.Name = "txtPowName"
- Me.txtPowName.Size = New System.Drawing.Size(200, 20)
- Me.txtPowName.TabIndex = 6
- '
- 'txtPowWei
- '
- Me.txtPowWei.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPowWei.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPowWei.Location = New System.Drawing.Point(132, 174)
- Me.txtPowWei.Name = "txtPowWei"
- Me.txtPowWei.Size = New System.Drawing.Size(200, 20)
- Me.txtPowWei.TabIndex = 7
- '
- 'txtPowManu
- '
- Me.txtPowManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPowManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPowManu.Location = New System.Drawing.Point(132, 200)
- Me.txtPowManu.Name = "txtPowManu"
- Me.txtPowManu.Size = New System.Drawing.Size(200, 20)
- Me.txtPowManu.TabIndex = 8
- '
- 'txtBullet
- '
- Me.txtBullet.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtBullet.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtBullet.Location = New System.Drawing.Point(132, 226)
- Me.txtBullet.Name = "txtBullet"
- Me.txtBullet.Size = New System.Drawing.Size(200, 20)
- Me.txtBullet.TabIndex = 9
- '
- 'txtPrimer
- '
- Me.txtPrimer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrimer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrimer.Location = New System.Drawing.Point(132, 252)
- Me.txtPrimer.Name = "txtPrimer"
- Me.txtPrimer.Size = New System.Drawing.Size(200, 20)
- Me.txtPrimer.TabIndex = 10
- '
- 'txtCase
- '
- Me.txtCase.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtCase.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtCase.Location = New System.Drawing.Point(132, 278)
- Me.txtCase.Name = "txtCase"
- Me.txtCase.Size = New System.Drawing.Size(200, 20)
- Me.txtCase.TabIndex = 11
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmAddDataSheet_RiflePistols_MAN
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(349, 495)
- Me.Controls.Add(Me.txtCase)
- Me.Controls.Add(Me.txtPrimer)
- Me.Controls.Add(Me.txtBullet)
- Me.Controls.Add(Me.txtPowManu)
- Me.Controls.Add(Me.txtPowWei)
- Me.Controls.Add(Me.txtPowName)
- Me.Controls.Add(Me.Label14)
- Me.Controls.Add(Me.Label13)
- Me.Controls.Add(Me.Label12)
- Me.Controls.Add(Me.Label11)
- Me.Controls.Add(Me.Label10)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.nudYards)
- Me.Controls.Add(Me.Label9)
- Me.Controls.Add(Me.nudShots)
- Me.Controls.Add(Me.Label8)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtNotes)
- Me.Controls.Add(Me.txtLen)
- Me.Controls.Add(Me.txtCon)
- Me.Controls.Add(Me.txtGroup)
- Me.Controls.Add(Me.dtpTested)
- Me.Controls.Add(Me.cmbFirearm)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add to Loaders Log - Rifle & Pistol - Manual")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add to Loaders Log - Rifle & Pistol - Manual")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "FrmAddDataSheetRiflePistolsMan"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add To Loaders Log "
- CType(Me.nudYards, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.nudShots, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmAddDataSheetRiflePistolsMan))
+ Me.nudYards = New System.Windows.Forms.NumericUpDown
+ Me.Label9 = New System.Windows.Forms.Label
+ Me.nudShots = New System.Windows.Forms.NumericUpDown
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.txtNotes = New System.Windows.Forms.TextBox
+ Me.txtLen = New System.Windows.Forms.TextBox
+ Me.txtCon = New System.Windows.Forms.TextBox
+ Me.txtGroup = New System.Windows.Forms.TextBox
+ Me.dtpTested = New System.Windows.Forms.DateTimePicker
+ Me.cmbFirearm = New System.Windows.Forms.ComboBox
+ Me.LoadersLogFirearmsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Loaders_Log_FirearmsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label10 = New System.Windows.Forms.Label
+ Me.Label11 = New System.Windows.Forms.Label
+ Me.Label12 = New System.Windows.Forms.Label
+ Me.Label13 = New System.Windows.Forms.Label
+ Me.Label14 = New System.Windows.Forms.Label
+ Me.txtPowName = New System.Windows.Forms.TextBox
+ Me.txtPowWei = New System.Windows.Forms.TextBox
+ Me.txtPowManu = New System.Windows.Forms.TextBox
+ Me.txtBullet = New System.Windows.Forms.TextBox
+ Me.txtPrimer = New System.Windows.Forms.TextBox
+ Me.txtCase = New System.Windows.Forms.TextBox
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudShots, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'nudYards
+ '
+ Me.nudYards.Location = New System.Drawing.Point(132, 69)
+ Me.nudYards.Maximum = New Decimal(New Integer() {5000, 0, 0, 0})
+ Me.nudYards.Name = "nudYards"
+ Me.nudYards.Size = New System.Drawing.Size(200, 20)
+ Me.nudYards.TabIndex = 3
+ '
+ 'Label9
+ '
+ Me.Label9.AutoSize = True
+ Me.Label9.Location = New System.Drawing.Point(12, 71)
+ Me.Label9.Name = "Label9"
+ Me.Label9.Size = New System.Drawing.Size(81, 13)
+ Me.Label9.TabIndex = 38
+ Me.Label9.Text = "Yards tested at:"
+ '
+ 'nudShots
+ '
+ Me.nudShots.Location = New System.Drawing.Point(132, 123)
+ Me.nudShots.Maximum = New Decimal(New Integer() {1000, 0, 0, 0})
+ Me.nudShots.Name = "nudShots"
+ Me.nudShots.Size = New System.Drawing.Size(200, 20)
+ Me.nudShots.TabIndex = 5
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(12, 125)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(89, 13)
+ Me.Label8.TabIndex = 36
+ Me.Label8.Text = "Number of Shots:"
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(257, 463)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 16
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(15, 463)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 15
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'txtNotes
+ '
+ Me.txtNotes.Location = New System.Drawing.Point(15, 371)
+ Me.txtNotes.Multiline = True
+ Me.txtNotes.Name = "txtNotes"
+ Me.txtNotes.Size = New System.Drawing.Size(317, 84)
+ Me.txtNotes.TabIndex = 14
+ '
+ 'txtLen
+ '
+ Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLen.Location = New System.Drawing.Point(132, 330)
+ Me.txtLen.Name = "txtLen"
+ Me.txtLen.Size = New System.Drawing.Size(200, 20)
+ Me.txtLen.TabIndex = 13
+ '
+ 'txtCon
+ '
+ Me.txtCon.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCon.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCon.Location = New System.Drawing.Point(132, 304)
+ Me.txtCon.Name = "txtCon"
+ Me.txtCon.Size = New System.Drawing.Size(200, 20)
+ Me.txtCon.TabIndex = 12
+ '
+ 'txtGroup
+ '
+ Me.txtGroup.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtGroup.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtGroup.Location = New System.Drawing.Point(132, 95)
+ Me.txtGroup.Name = "txtGroup"
+ Me.txtGroup.Size = New System.Drawing.Size(200, 20)
+ Me.txtGroup.TabIndex = 4
+ '
+ 'dtpTested
+ '
+ Me.dtpTested.Location = New System.Drawing.Point(132, 42)
+ Me.dtpTested.Name = "dtpTested"
+ Me.dtpTested.Size = New System.Drawing.Size(200, 20)
+ Me.dtpTested.TabIndex = 2
+ '
+ 'cmbFirearm
+ '
+ Me.cmbFirearm.DataSource = Me.LoadersLogFirearmsBindingSource
+ Me.cmbFirearm.DisplayMember = "FullName"
+ Me.cmbFirearm.FormattingEnabled = True
+ Me.cmbFirearm.Location = New System.Drawing.Point(132, 15)
+ Me.cmbFirearm.Name = "cmbFirearm"
+ Me.cmbFirearm.Size = New System.Drawing.Size(200, 21)
+ Me.cmbFirearm.TabIndex = 1
+ Me.cmbFirearm.ValueMember = "ID"
+ '
+ 'LoadersLogFirearmsBindingSource
+ '
+ Me.LoadersLogFirearmsBindingSource.DataMember = "Loaders_Log_Firearms"
+ Me.LoadersLogFirearmsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(12, 355)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(35, 13)
+ Me.Label7.TabIndex = 26
+ Me.Label7.Text = "Notes"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 333)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(70, 13)
+ Me.Label6.TabIndex = 25
+ Me.Label6.Text = "Total Length:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 307)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(59, 13)
+ Me.Label5.TabIndex = 24
+ Me.Label5.Text = "Conditions:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 98)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(103, 13)
+ Me.Label3.TabIndex = 22
+ Me.Label3.Text = "Group size or Score:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 46)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(65, 13)
+ Me.Label2.TabIndex = 21
+ Me.Label2.Text = "Date tested:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 18)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(98, 13)
+ Me.Label1.TabIndex = 20
+ Me.Label1.Text = "Firearm tested with:"
+ '
+ 'Loaders_Log_FirearmsTableAdapter
+ '
+ Me.Loaders_Log_FirearmsTableAdapter.ClearBeforeFill = True
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 152)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(77, 13)
+ Me.Label4.TabIndex = 40
+ Me.Label4.Text = "Powder Name:"
+ '
+ 'Label10
+ '
+ Me.Label10.AutoSize = True
+ Me.Label10.Location = New System.Drawing.Point(12, 177)
+ Me.Label10.Name = "Label10"
+ Me.Label10.Size = New System.Drawing.Size(123, 13)
+ Me.Label10.TabIndex = 41
+ Me.Label10.Text = "Weight of Powder Used:"
+ '
+ 'Label11
+ '
+ Me.Label11.AutoSize = True
+ Me.Label11.Location = New System.Drawing.Point(12, 203)
+ Me.Label11.Name = "Label11"
+ Me.Label11.Size = New System.Drawing.Size(112, 13)
+ Me.Label11.TabIndex = 42
+ Me.Label11.Text = "Powder Manufacturer:"
+ '
+ 'Label12
+ '
+ Me.Label12.AutoSize = True
+ Me.Label12.Location = New System.Drawing.Point(12, 229)
+ Me.Label12.Name = "Label12"
+ Me.Label12.Size = New System.Drawing.Size(36, 13)
+ Me.Label12.TabIndex = 43
+ Me.Label12.Text = "Bullet:"
+ '
+ 'Label13
+ '
+ Me.Label13.AutoSize = True
+ Me.Label13.Location = New System.Drawing.Point(12, 255)
+ Me.Label13.Name = "Label13"
+ Me.Label13.Size = New System.Drawing.Size(39, 13)
+ Me.Label13.TabIndex = 44
+ Me.Label13.Text = "Primer:"
+ '
+ 'Label14
+ '
+ Me.Label14.AutoSize = True
+ Me.Label14.Location = New System.Drawing.Point(12, 281)
+ Me.Label14.Name = "Label14"
+ Me.Label14.Size = New System.Drawing.Size(34, 13)
+ Me.Label14.TabIndex = 45
+ Me.Label14.Text = "Case:"
+ '
+ 'txtPowName
+ '
+ Me.txtPowName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowName.Location = New System.Drawing.Point(132, 149)
+ Me.txtPowName.Name = "txtPowName"
+ Me.txtPowName.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowName.TabIndex = 6
+ '
+ 'txtPowWei
+ '
+ Me.txtPowWei.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowWei.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowWei.Location = New System.Drawing.Point(132, 174)
+ Me.txtPowWei.Name = "txtPowWei"
+ Me.txtPowWei.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowWei.TabIndex = 7
+ '
+ 'txtPowManu
+ '
+ Me.txtPowManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowManu.Location = New System.Drawing.Point(132, 200)
+ Me.txtPowManu.Name = "txtPowManu"
+ Me.txtPowManu.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowManu.TabIndex = 8
+ '
+ 'txtBullet
+ '
+ Me.txtBullet.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtBullet.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtBullet.Location = New System.Drawing.Point(132, 226)
+ Me.txtBullet.Name = "txtBullet"
+ Me.txtBullet.Size = New System.Drawing.Size(200, 20)
+ Me.txtBullet.TabIndex = 9
+ '
+ 'txtPrimer
+ '
+ Me.txtPrimer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrimer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrimer.Location = New System.Drawing.Point(132, 252)
+ Me.txtPrimer.Name = "txtPrimer"
+ Me.txtPrimer.Size = New System.Drawing.Size(200, 20)
+ Me.txtPrimer.TabIndex = 10
+ '
+ 'txtCase
+ '
+ Me.txtCase.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCase.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCase.Location = New System.Drawing.Point(132, 278)
+ Me.txtCase.Name = "txtCase"
+ Me.txtCase.Size = New System.Drawing.Size(200, 20)
+ Me.txtCase.TabIndex = 11
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmAddDataSheet_RiflePistols_MAN
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(349, 495)
+ Me.Controls.Add(Me.txtCase)
+ Me.Controls.Add(Me.txtPrimer)
+ Me.Controls.Add(Me.txtBullet)
+ Me.Controls.Add(Me.txtPowManu)
+ Me.Controls.Add(Me.txtPowWei)
+ Me.Controls.Add(Me.txtPowName)
+ Me.Controls.Add(Me.Label14)
+ Me.Controls.Add(Me.Label13)
+ Me.Controls.Add(Me.Label12)
+ Me.Controls.Add(Me.Label11)
+ Me.Controls.Add(Me.Label10)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.nudYards)
+ Me.Controls.Add(Me.Label9)
+ Me.Controls.Add(Me.nudShots)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtNotes)
+ Me.Controls.Add(Me.txtLen)
+ Me.Controls.Add(Me.txtCon)
+ Me.Controls.Add(Me.txtGroup)
+ Me.Controls.Add(Me.dtpTested)
+ Me.Controls.Add(Me.cmbFirearm)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add to Loaders Log - Rifle & Pistol - Manual")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add to Loaders Log - Rifle & Pistol - Manual")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmAddDataSheetRiflePistolsMan"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add To Loaders Log "
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudShots, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents nudYards As System.Windows.Forms.NumericUpDown
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents nudShots As System.Windows.Forms.NumericUpDown
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents txtNotes As System.Windows.Forms.TextBox
- Friend WithEvents txtLen As System.Windows.Forms.TextBox
- Friend WithEvents txtCon As System.Windows.Forms.TextBox
- Friend WithEvents txtGroup As System.Windows.Forms.TextBox
- Friend WithEvents dtpTested As System.Windows.Forms.DateTimePicker
- Friend WithEvents cmbFirearm As System.Windows.Forms.ComboBox
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents LoadersLogFirearmsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents Loaders_Log_FirearmsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents txtPowName As System.Windows.Forms.TextBox
- Friend WithEvents txtPowWei As System.Windows.Forms.TextBox
- Friend WithEvents txtPowManu As System.Windows.Forms.TextBox
- Friend WithEvents txtBullet As System.Windows.Forms.TextBox
- Friend WithEvents txtPrimer As System.Windows.Forms.TextBox
- Friend WithEvents txtCase As System.Windows.Forms.TextBox
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents nudYards As System.Windows.Forms.NumericUpDown
+ Friend WithEvents Label9 As System.Windows.Forms.Label
+ Friend WithEvents nudShots As System.Windows.Forms.NumericUpDown
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents txtNotes As System.Windows.Forms.TextBox
+ Friend WithEvents txtLen As System.Windows.Forms.TextBox
+ Friend WithEvents txtCon As System.Windows.Forms.TextBox
+ Friend WithEvents txtGroup As System.Windows.Forms.TextBox
+ Friend WithEvents dtpTested As System.Windows.Forms.DateTimePicker
+ Friend WithEvents cmbFirearm As System.Windows.Forms.ComboBox
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents LoadersLogFirearmsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents Loaders_Log_FirearmsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label10 As System.Windows.Forms.Label
+ Friend WithEvents Label11 As System.Windows.Forms.Label
+ Friend WithEvents Label12 As System.Windows.Forms.Label
+ Friend WithEvents Label13 As System.Windows.Forms.Label
+ Friend WithEvents Label14 As System.Windows.Forms.Label
+ Friend WithEvents txtPowName As System.Windows.Forms.TextBox
+ Friend WithEvents txtPowWei As System.Windows.Forms.TextBox
+ Friend WithEvents txtPowManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtBullet As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrimer As System.Windows.Forms.TextBox
+ Friend WithEvents txtCase As System.Windows.Forms.TextBox
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.vb b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.vb
index 3fcadff..2e570b8 100644
--- a/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.vb
+++ b/BSMyLoadersLog/Adding/frmAddDataSheet_RiflePistols_MAN.vb
@@ -1,112 +1,130 @@
-Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.LoadersLog
+Imports BurnSoft.Applications.MLL.Types
-'''
-''' Add Data sheet for Rifle or Pistol, aka metallic reloading data sheet
-'''
-Public Class FrmAddDataSheetRiflePistolsMan
+Namespace Adding
'''
- ''' This is from a view
+ ''' Add Data sheet for Rifle or Pistol, aka metallic reloading data sheet
'''
- Public FromView As Boolean
- '''
- ''' Firearm Id
- '''
- Public Fid As Long
- '''
- ''' Load the Auto Fill Fields
- '''
- Sub LoadAutoFill()
- Try
- Dim objAf As New AutoFillCollections
- txtGroup.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_GroupSize
- txtCon.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_conditions
- txtLen.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_tl
- txtPowName.AutoCompleteCustomSource = objAf.General_Powder_Name
- txtPowManu.AutoCompleteCustomSource = objAf.General_Powder_Manufacturer
- txtBullet.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_Bullet
- txtPrimer.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_primer
- txtCase.AutoCompleteCustomSource = objAf.Loaders_Log_NSG_case
- Catch ex As Exception
- Call LogError(Name, "LoadAutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Will the data table with durrent log information
- '''
- Sub LoadData()
- Try
- Loaders_Log_FirearmsTableAdapter.Fill(MLLDataSet.Loaders_Log_Firearms)
- cmbFirearm.SelectedValue = Fid
- Catch ex As Exception
- Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Save the informamtion to the database
- '''
- Sub SaveData()
- Try
- Dim lngFid As Long = cmbFirearm.SelectedValue
- Dim strFireArm As String = cmbFirearm.Text
- Dim strDateTested As String = dtpTested.Value
- Dim strGroup As String = GeneralHelpers.FluffContent(txtGroup.Text)
- Dim lngNumShots As Long = nudShots.Value
- Dim lngYards As Long = nudYards.Value
- Dim strPowName As String = GeneralHelpers.FluffContent(txtPowName.Text)
- Dim strPowWei As String = GeneralHelpers.FluffContent(txtPowWei.Text)
- Dim strPowManu As String = GeneralHelpers.FluffContent(txtPowManu.Text)
- Dim strBullet As String = GeneralHelpers.FluffContent(txtBullet.Text)
- Dim strPrimer As String = GeneralHelpers.FluffContent(txtPrimer.Text)
- Dim strCase As String = GeneralHelpers.FluffContent(txtCase.Text)
- Dim strCond As String = GeneralHelpers.FluffContent(txtCon.Text)
- Dim strLen As String = GeneralHelpers.FluffContent(txtLen.Text)
- Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
- Dim configName As String = "N/A"
- Dim strBarLen As String = ""
- Dim caliber As String = ""
- Dim obj As New BSDatabase
- Dim objGf As New GlobalFunctions
- Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", caliber, strBarLen)
- Dim sql As String = "INSERT INTO Loaders_Log_NSG (fid,dt,yds,gs,ns,pwm,bullet," & _
- "primer,case,conditions,tl,notes,ConfigName,FirearmName,Caliber,BarrelLen)" & _
- " VALUES (" & lngFid & ",'" & strDateTested & "'," & lngYards & _
- ",'" & strGroup & "'," & lngNumShots & ",'" & strPowName & " - " & strPowWei & _
- " - " & strPowManu & "','" & strBullet & _
- "','" & strPrimer & "','" & strCase & _
- "','" & strCond & "','" & strLen & "','" & strNotes & "','" & _
- configName & "','" & strFireArm & "','" & caliber & "','" & strBarLen & "')"
- obj.ConnExec(sql)
- MsgBox("Information was saved to the Loaders Log!")
- If FromView Then Call frmViewDataSheet_RiflePistols.LoadDataCur()
+ Public Class FrmAddDataSheetRiflePistolsMan
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' This is from a view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Firearm Id
+ '''
+ Public Fid As Long
+ '''
+ ''' Load the Auto Fill Fields
+ '''
+ Sub LoadAutoFill()
+ Try
+ txtGroup.AutoCompleteCustomSource = ConfigMetalic.GroupSize(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtCon.AutoCompleteCustomSource = ConfigMetalic.Conditions(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtLen.AutoCompleteCustomSource = ConfigMetalic.TotalLenght(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPowName.AutoCompleteCustomSource = Powder.Name(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPowManu.AutoCompleteCustomSource = Powder.Manufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtBullet.AutoCompleteCustomSource = ConfigMetalic.Bullet(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrimer.AutoCompleteCustomSource = ConfigMetalic.Primer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtCase.AutoCompleteCustomSource = ConfigMetalic.Case(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "LoadAutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Will the data table with durrent log information
+ '''
+ Sub LoadData()
+ Try
+ Loaders_Log_FirearmsTableAdapter.Fill(MLLDataSet.Loaders_Log_Firearms)
+ cmbFirearm.SelectedValue = Fid
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Save the informamtion to the database
+ '''
+ Sub SaveData()
+ Try
+ Dim firearmId As Long = cmbFirearm.SelectedValue
+ Dim firearmName As String = cmbFirearm.Text
+ Dim dateCreated As String = dtpTested.Value
+ Dim groupSize As String = GeneralHelpers.FluffContent(txtGroup.Text)
+ Dim numShots As Long = nudShots.Value
+ Dim yards As Long = nudYards.Value
+ Dim powderName As String = GeneralHelpers.FluffContent(txtPowName.Text)
+ Dim powderWeight As String = GeneralHelpers.FluffContent(txtPowWei.Text)
+ Dim powderManufacturer As String = GeneralHelpers.FluffContent(txtPowManu.Text)
+ Dim bulletDetails As String = GeneralHelpers.FluffContent(txtBullet.Text)
+ Dim primerDetails As String = GeneralHelpers.FluffContent(txtPrimer.Text)
+ Dim caseDetails As String = GeneralHelpers.FluffContent(txtCase.Text)
+ Dim condition As String = GeneralHelpers.FluffContent(txtCon.Text)
+ Dim oal As String = GeneralHelpers.FluffContent(txtLen.Text)
+ Dim notes As String = GeneralHelpers.FluffContent(txtNotes.Text)
+ Dim configName As String = "N/A"
+ Dim barrelLenght As String = ""
+ Dim caliber As String = ""
+
+ Dim lst As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, CInt(firearmId), _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As FirearmCollection In lst
+ caliber = o.Caliber
+ barrelLenght = o.Barrel
+ Next
+
+ If Not LoadersLogMetallic.Add(DatabasePath, firearmId, dateCreated, CInt(yards), groupSize,
+ CInt(numShots), $"{powderName} - {powderWeight} - {powderManufacturer}",
+ bulletDetails, primerDetails, caseDetails, condition, oal, notes,
+ configName, firearmName, caliber, barrelLenght,
+ _errOut) Then Throw New Exception(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ MsgBox("Information was saved to the Loaders Log!")
+ If FromView Then Call FrmViewDataSheetRiflePistols.LoadDataCur()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Manual Load view
+ '''
+ '''
+ '''
+ Private Sub frmAddDataSheet_RiflePistols_MAN_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ Call LoadAutoFill()
+ End Sub
+ '''
+ ''' Canel button
+ '''
+ '''
+ '''
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
Close()
- Catch ex As Exception
- Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Manual Load view
- '''
- '''
- '''
- Private Sub frmAddDataSheet_RiflePistols_MAN_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
- Call LoadData()
- Call LoadAutoFill()
- End Sub
- '''
- ''' Canel button
- '''
- '''
- '''
- Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
- Close()
- End Sub
- '''
- ''' Add Button
- '''
- '''
- '''
- Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
- Call SaveData()
- End Sub
-End Class
\ No newline at end of file
+ End Sub
+ '''
+ ''' Add Button
+ '''
+ '''
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.Designer.vb b/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.Designer.vb
index 5887145..0234289 100644
--- a/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.Designer.vb
@@ -1,251 +1,253 @@
- _
-Partial Class FrmAddDataSheetShotGunCfg
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddDataSheetShotGunCfg
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmAddDataSheetShotGunCfg))
- Me.Label1 = New System.Windows.Forms.Label()
- Me.Label2 = New System.Windows.Forms.Label()
- Me.Label3 = New System.Windows.Forms.Label()
- Me.Label4 = New System.Windows.Forms.Label()
- Me.Label5 = New System.Windows.Forms.Label()
- Me.Label6 = New System.Windows.Forms.Label()
- Me.cmbFirearm = New System.Windows.Forms.ComboBox()
- Me.LoadersLogFirearmsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet()
- Me.Loaders_Log_FirearmsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter()
- Me.dtpTested = New System.Windows.Forms.DateTimePicker()
- Me.nudYards = New System.Windows.Forms.NumericUpDown()
- Me.cmbConfiguration = New System.Windows.Forms.ComboBox()
- Me.ConfigListSimpleSGBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.txtPattern = New System.Windows.Forms.TextBox()
- Me.txtNotes = New System.Windows.Forms.TextBox()
- Me.btnAdd = New System.Windows.Forms.Button()
- Me.btnCancel = New System.Windows.Forms.Button()
- Me.ConfigList_Simple_SGTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.ConfigList_Simple_SGTableAdapter()
- CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.nudYards, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ConfigListSimpleSGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 23)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(98, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Firearm tested with:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 53)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(65, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Date tested:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(10, 79)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(81, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Yards tested at:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(10, 102)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(100, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Configuration Used:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(10, 129)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(82, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Pattern Density:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(10, 151)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(38, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Notes:"
- '
- 'cmbFirearm
- '
- Me.cmbFirearm.DataSource = Me.LoadersLogFirearmsBindingSource
- Me.cmbFirearm.DisplayMember = "FullName"
- Me.cmbFirearm.FormattingEnabled = True
- Me.cmbFirearm.Location = New System.Drawing.Point(115, 20)
- Me.cmbFirearm.Name = "cmbFirearm"
- Me.cmbFirearm.Size = New System.Drawing.Size(213, 21)
- Me.cmbFirearm.TabIndex = 6
- Me.cmbFirearm.ValueMember = "ID"
- '
- 'LoadersLogFirearmsBindingSource
- '
- Me.LoadersLogFirearmsBindingSource.DataMember = "Loaders_Log_Firearms"
- Me.LoadersLogFirearmsBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'Loaders_Log_FirearmsTableAdapter
- '
- Me.Loaders_Log_FirearmsTableAdapter.ClearBeforeFill = True
- '
- 'dtpTested
- '
- Me.dtpTested.Location = New System.Drawing.Point(115, 47)
- Me.dtpTested.Name = "dtpTested"
- Me.dtpTested.Size = New System.Drawing.Size(213, 20)
- Me.dtpTested.TabIndex = 7
- '
- 'nudYards
- '
- Me.nudYards.Location = New System.Drawing.Point(115, 73)
- Me.nudYards.Maximum = New Decimal(New Integer() {5000, 0, 0, 0})
- Me.nudYards.Name = "nudYards"
- Me.nudYards.Size = New System.Drawing.Size(213, 20)
- Me.nudYards.TabIndex = 8
- Me.nudYards.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
- '
- 'cmbConfiguration
- '
- Me.cmbConfiguration.DataSource = Me.ConfigListSimpleSGBindingSource
- Me.cmbConfiguration.DisplayMember = "ConfigName"
- Me.cmbConfiguration.FormattingEnabled = True
- Me.cmbConfiguration.Location = New System.Drawing.Point(115, 99)
- Me.cmbConfiguration.Name = "cmbConfiguration"
- Me.cmbConfiguration.Size = New System.Drawing.Size(213, 21)
- Me.cmbConfiguration.TabIndex = 9
- Me.cmbConfiguration.ValueMember = "ID"
- '
- 'ConfigListSimpleSGBindingSource
- '
- Me.ConfigListSimpleSGBindingSource.DataMember = "ConfigList_Simple_SG"
- Me.ConfigListSimpleSGBindingSource.DataSource = Me.MLLDataSet
- '
- 'txtPattern
- '
- Me.txtPattern.Location = New System.Drawing.Point(115, 126)
- Me.txtPattern.Name = "txtPattern"
- Me.txtPattern.Size = New System.Drawing.Size(213, 20)
- Me.txtPattern.TabIndex = 10
- '
- 'txtNotes
- '
- Me.txtNotes.Location = New System.Drawing.Point(13, 168)
- Me.txtNotes.Multiline = True
- Me.txtNotes.Name = "txtNotes"
- Me.txtNotes.Size = New System.Drawing.Size(315, 102)
- Me.txtNotes.TabIndex = 11
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(13, 277)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 12
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.Location = New System.Drawing.Point(252, 278)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 13
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'ConfigList_Simple_SGTableAdapter
- '
- Me.ConfigList_Simple_SGTableAdapter.ClearBeforeFill = True
- '
- 'frmAddDataSheet_ShotGun_CFG
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(339, 313)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtNotes)
- Me.Controls.Add(Me.txtPattern)
- Me.Controls.Add(Me.cmbConfiguration)
- Me.Controls.Add(Me.nudYards)
- Me.Controls.Add(Me.dtpTested)
- Me.Controls.Add(Me.cmbFirearm)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "FrmAddDataSheetShotGunCfg"
- Me.Text = "Add to Loaders Log Using a Configuration"
- CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.nudYards, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ConfigListSimpleSGBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmAddDataSheetShotGunCfg))
+ Me.Label1 = New System.Windows.Forms.Label()
+ Me.Label2 = New System.Windows.Forms.Label()
+ Me.Label3 = New System.Windows.Forms.Label()
+ Me.Label4 = New System.Windows.Forms.Label()
+ Me.Label5 = New System.Windows.Forms.Label()
+ Me.Label6 = New System.Windows.Forms.Label()
+ Me.cmbFirearm = New System.Windows.Forms.ComboBox()
+ Me.LoadersLogFirearmsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet()
+ Me.Loaders_Log_FirearmsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter()
+ Me.dtpTested = New System.Windows.Forms.DateTimePicker()
+ Me.nudYards = New System.Windows.Forms.NumericUpDown()
+ Me.cmbConfiguration = New System.Windows.Forms.ComboBox()
+ Me.ConfigListSimpleSGBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.txtPattern = New System.Windows.Forms.TextBox()
+ Me.txtNotes = New System.Windows.Forms.TextBox()
+ Me.btnAdd = New System.Windows.Forms.Button()
+ Me.btnCancel = New System.Windows.Forms.Button()
+ Me.ConfigList_Simple_SGTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.ConfigList_Simple_SGTableAdapter()
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ConfigListSimpleSGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 23)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(98, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Firearm tested with:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 53)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(65, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Date tested:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(10, 79)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(81, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Yards tested at:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(10, 102)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(100, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Configuration Used:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(10, 129)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(82, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Pattern Density:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(10, 151)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(38, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Notes:"
+ '
+ 'cmbFirearm
+ '
+ Me.cmbFirearm.DataSource = Me.LoadersLogFirearmsBindingSource
+ Me.cmbFirearm.DisplayMember = "FullName"
+ Me.cmbFirearm.FormattingEnabled = True
+ Me.cmbFirearm.Location = New System.Drawing.Point(115, 20)
+ Me.cmbFirearm.Name = "cmbFirearm"
+ Me.cmbFirearm.Size = New System.Drawing.Size(213, 21)
+ Me.cmbFirearm.TabIndex = 6
+ Me.cmbFirearm.ValueMember = "ID"
+ '
+ 'LoadersLogFirearmsBindingSource
+ '
+ Me.LoadersLogFirearmsBindingSource.DataMember = "Loaders_Log_Firearms"
+ Me.LoadersLogFirearmsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'Loaders_Log_FirearmsTableAdapter
+ '
+ Me.Loaders_Log_FirearmsTableAdapter.ClearBeforeFill = True
+ '
+ 'dtpTested
+ '
+ Me.dtpTested.Location = New System.Drawing.Point(115, 47)
+ Me.dtpTested.Name = "dtpTested"
+ Me.dtpTested.Size = New System.Drawing.Size(213, 20)
+ Me.dtpTested.TabIndex = 7
+ '
+ 'nudYards
+ '
+ Me.nudYards.Location = New System.Drawing.Point(115, 73)
+ Me.nudYards.Maximum = New Decimal(New Integer() {5000, 0, 0, 0})
+ Me.nudYards.Name = "nudYards"
+ Me.nudYards.Size = New System.Drawing.Size(213, 20)
+ Me.nudYards.TabIndex = 8
+ Me.nudYards.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
+ '
+ 'cmbConfiguration
+ '
+ Me.cmbConfiguration.DataSource = Me.ConfigListSimpleSGBindingSource
+ Me.cmbConfiguration.DisplayMember = "ConfigName"
+ Me.cmbConfiguration.FormattingEnabled = True
+ Me.cmbConfiguration.Location = New System.Drawing.Point(115, 99)
+ Me.cmbConfiguration.Name = "cmbConfiguration"
+ Me.cmbConfiguration.Size = New System.Drawing.Size(213, 21)
+ Me.cmbConfiguration.TabIndex = 9
+ Me.cmbConfiguration.ValueMember = "ID"
+ '
+ 'ConfigListSimpleSGBindingSource
+ '
+ Me.ConfigListSimpleSGBindingSource.DataMember = "ConfigList_Simple_SG"
+ Me.ConfigListSimpleSGBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'txtPattern
+ '
+ Me.txtPattern.Location = New System.Drawing.Point(115, 126)
+ Me.txtPattern.Name = "txtPattern"
+ Me.txtPattern.Size = New System.Drawing.Size(213, 20)
+ Me.txtPattern.TabIndex = 10
+ '
+ 'txtNotes
+ '
+ Me.txtNotes.Location = New System.Drawing.Point(13, 168)
+ Me.txtNotes.Multiline = True
+ Me.txtNotes.Name = "txtNotes"
+ Me.txtNotes.Size = New System.Drawing.Size(315, 102)
+ Me.txtNotes.TabIndex = 11
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(13, 277)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 12
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(252, 278)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 13
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'ConfigList_Simple_SGTableAdapter
+ '
+ Me.ConfigList_Simple_SGTableAdapter.ClearBeforeFill = True
+ '
+ 'frmAddDataSheet_ShotGun_CFG
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(339, 313)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtNotes)
+ Me.Controls.Add(Me.txtPattern)
+ Me.Controls.Add(Me.cmbConfiguration)
+ Me.Controls.Add(Me.nudYards)
+ Me.Controls.Add(Me.dtpTested)
+ Me.Controls.Add(Me.cmbFirearm)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmAddDataSheetShotGunCfg"
+ Me.Text = "Add to Loaders Log Using a Configuration"
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ConfigListSimpleSGBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents cmbFirearm As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents LoadersLogFirearmsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents Loaders_Log_FirearmsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
- Friend WithEvents dtpTested As System.Windows.Forms.DateTimePicker
- Friend WithEvents nudYards As System.Windows.Forms.NumericUpDown
- Friend WithEvents cmbConfiguration As System.Windows.Forms.ComboBox
- Friend WithEvents txtPattern As System.Windows.Forms.TextBox
- Friend WithEvents txtNotes As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents ConfigListSimpleSGBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents ConfigList_Simple_SGTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.ConfigList_Simple_SGTableAdapter
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents cmbFirearm As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents LoadersLogFirearmsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents Loaders_Log_FirearmsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
+ Friend WithEvents dtpTested As System.Windows.Forms.DateTimePicker
+ Friend WithEvents nudYards As System.Windows.Forms.NumericUpDown
+ Friend WithEvents cmbConfiguration As System.Windows.Forms.ComboBox
+ Friend WithEvents txtPattern As System.Windows.Forms.TextBox
+ Friend WithEvents txtNotes As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents ConfigListSimpleSGBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents ConfigList_Simple_SGTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.ConfigList_Simple_SGTableAdapter
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.vb b/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.vb
index 710dae7..73ea731 100644
--- a/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.vb
+++ b/BSMyLoadersLog/Adding/frmAddDataSheet_ShotGun_CFG.vb
@@ -1,164 +1,297 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
-Public Class FrmAddDataSheetShotGunCfg
- Public Fid As Long
- Public FromView As Boolean
- Sub LoadAutoFill()
- Try
-
- Dim objAf As New AutoFillCollections.ShotGun
- 'Put in things that you want to autofill in this box
- txtPattern.AutoCompleteCustomSource = objAf.List_SG_Log_SG_Patterns()
-
- Catch ex As Exception
- Call LogError(Name, "LoadAutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim lngFid As Long = cmbFirearm.SelectedValue
- Dim strFireArm As String = cmbFirearm.Text
- Dim strdateTested As String = dtpTested.Value
- Dim strPattern As String = txtPattern.Text
- Dim lngYards As Long = nudYards.Value
- Dim configId As Long = cmbConfiguration.SelectedValue
- Dim configName As String = cmbConfiguration.Text
- Dim strNotes As String = txtNotes.Text
- Dim strBarLen As String = ""
- Dim powName As String = ""
- Dim powWei As Double = 0
- Dim powManu As String = ""
- Dim shotWt As String = ""
- Dim shotSizeNo As String = ""
- Dim hullName As String = ""
- Dim hullManufacturer As String = ""
- Dim hullLength As String = ""
- Dim hullDram As String = ""
- Dim pbm As String = ""
- Dim wad As String = ""
- Dim primerName As String = ""
- Dim priManu As String = ""
- Dim pd As String = ""
- Dim caliber As String = ""
- Dim obj As New BSDatabase
- Dim objIm As New InventoryMath
- Dim objGf As New GlobalFunctions
-
- Dim shotDetailsManu As String = ""
- Dim shotDetailsName As String = ""
- Dim shotDetailsQty As Double
- Dim shotDetailsEpps As Double
- Dim shotDetailsGr As Double
- Dim isSlug As Boolean = False
- Dim shotMaterial As String = ""
- Dim shotShotNo As String = ""
- Dim slugWeight As String = ""
- Dim instockShotOz As Double
- Dim prefLoad As String
- Dim shotPrefload As Double
- Dim costSlug As Double
- Dim costShot As Double
- Dim instockShot As Double
- Dim instockSlug As Double
- Dim wadManu As String = ""
- Dim wadName As String = ""
- Dim powderId As Long = 0
- Dim powderDefault As Double
- Dim powderManu As String = ""
- Dim powderName As String = ""
-
- Dim shotSize As String = ""
- Dim caseDetails As String = ""
- Dim primerDetails As String = ""
-
- Dim prefferedPowderId As Long = objIm.GetPrefSGPowderID(configId, powWei)
- Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", "", strBarLen)
- Call obj.ConnectDB()
-
- Dim sql As String = "SELECT * from Config_List_Data_SG where CLNID=" & configId
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- 'LEFTOFF - adding config data to log
- 'Subs are normally in the InvetoryMathSection
- caliber = objIm.GetCaliber(rs("CALID"))
-
- Call objIm.LoadPrimerInfo(rs("PRID"), priManu, primerName)
- primerDetails = priManu & " " & primerName
-
- Call objIm.LoadHullInfo(rs("CAID"), hullManufacturer, hullName, hullLength, 0, 0, hullDram)
- caseDetails = "DRAM: " & hullDram & " - " & hullManufacturer & " " & hullName
-
- Call objIm.LoadSG_ShotType_Details(rs("SCL"), shotDetailsManu, shotDetailsName, isSlug, _
- shotMaterial, shotShotNo, slugWeight, "", shotDetailsQty, shotDetailsEpps, _
- 0, instockShotOz, shotDetailsGr)
- If Not IsDBNull(rs("SW_t")) Then prefLoad = rs("SW_t")
- shotPrefload = rs("SW")
- If Not isSlug Then
- costShot = shotDetailsEpps
- instockShot = shotDetailsGr
- shotSize = "SLUG - " & shotDetailsManu & " - " & shotDetailsName
- Else
- costSlug = shotDetailsEpps
- instockSlug = shotDetailsQty
- shotSize = shotSizeNo & " - " & shotDetailsManu & " - " & shotDetailsName
- End If
-
- 'TODO: FINISHS THIS!!!
- 'Loaders_Log_SG
- 'THE SCL column is used for both Slug and Shot
- 'load wad information
- Call objIm.LoadWADInfo(rs("WAD"), wadManu, wadName, "", 0, 0, 0)
- wad = wadManu & " " & wadName
- 'load powder details into vars
- powderId = objIm.GetPrefSGPowderIDID(configId, powderDefault)
- Call objIm.GetPowderDetails(powderId, powderManu, powderName, 0, 0, 0, "", 0)
- pbm = powderDefault & " - " & "Bushing" & powderManu & " " & powderName
-
- End While
-
- rs.Close()
- rs = Nothing
- cmd = Nothing
- sql = "INSERT INTO Loaders_Log_SG(fid,FirearmName,Caliber,BarrelLen,ConfigName,Shotwt,ShotSize,case,pbm,wad,primer,pd,yds,notes) VALUES(" & _
- lngFid & ",'" & strFireArm & "','" & caliber & "','" & strBarLen & "','" & configName & "','" & shotWt & "','" & shotSize & _
- "','" & caseDetails & "','" & pbm & "','" & wad & "','" & primerDetails & "','" & pd & "'," & lngYards & ",'" & strNotes & "')"
-
-
- Catch ex As Exception
- Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub UpdateConfigList()
- Try
- Dim objGf As New GlobalFunctions
- Dim lngFid As Long = cmbFirearm.SelectedValue
- Dim strFireArm As String = ""
- Dim strCal As String = ""
- Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", strCal)
- Dim calId As Long = objGf.GetCaliberID(strCal)
- ConfigList_Simple_SGTableAdapter.FillBy_Caliber(MLLDataSet.ConfigList_Simple_SG, calId)
- Catch ex As Exception
- Call LogError(Name, "UpdateConfigList", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddDataSheet_ShotGun_CFG_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- Loaders_Log_FirearmsTableAdapter.FillByFullNameShotgunOnly(MLLDataSet.Loaders_Log_Firearms)
- cmbFirearm.SelectedValue = Fid
- Call UpdateConfigList()
- Call LoadAutoFill()
- End Sub
-
- Private Sub cmbFirearm_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles cmbFirearm.SelectedIndexChanged
- Call UpdateConfigList()
- End Sub
-
- Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
- Close()
- End Sub
-
- Private Sub btnAdd_Click(sender As System.Object, e As System.EventArgs) Handles btnAdd.Click
- Call SaveData()
- End Sub
-End Class
\ No newline at end of file
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
+Imports BurnSoft.Applications.MLL.ConfigSheets
+Imports BurnSoft.Applications.MLL.Global
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.LoadersLog
+Imports BurnSoft.Applications.MLL.Types
+
+Namespace Adding
+ '''
+ ''' Class FrmAddDataSheetShotGunCfg.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddDataSheetShotGunCfg
+ 'TODO: #20 Clean up Code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The firearm identifier
+ '''
+ Public FirearmId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Loads the automatic fill.
+ '''
+ '''
+ Sub LoadAutoFill()
+ Try
+
+ 'Dim objAf As New AutoFillCollections.ShotGun
+ ''Put in things that you want to autofill in this box
+ 'txtPattern.AutoCompleteCustomSource = objAf.List_SG_Log_SG_Patterns()
+ txtPattern.AutoCompleteCustomSource = ConfigShotgun.LogPattern(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "LoadAutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ FirearmId = cmbFirearm.SelectedValue
+ Dim firearmName As String = cmbFirearm.Text
+ Dim dateCreated As String = dtpTested.Value
+ Dim pattern As String = txtPattern.Text
+ Dim yards As Long = nudYards.Value
+ Dim configId As Long = cmbConfiguration.SelectedValue
+ Dim configName As String = cmbConfiguration.Text
+ Dim notes As String = txtNotes.Text
+ Dim barrelLenght As String = ""
+ 'Dim powderName As String = ""
+ Dim powderWeight As Double = 0
+ 'Dim powderManufacturer As String = ""
+ Dim shotWt As String = ""
+ Dim shotSizeNo As String = ""
+ 'Dim hullName As String = ""
+ 'Dim hullManufacturer As String = ""
+ 'Dim hullLength As String = ""
+ 'Dim hullDram As String = ""
+ Dim hullId as Long = 0
+ Dim powderDetails As String = ""
+ Dim wad As String = ""
+ Dim primerId as Long = 0
+ 'Dim primerName As String = ""
+ 'Dim primerManufacturer As String = ""
+ 'Dim pd As String = ""
+ Dim caliber As String = ""
+ 'Dim obj As New BSDatabase
+ 'Dim objIm As New InventoryMath
+ 'Dim objGf As New GlobalFunctions
+
+ 'Dim shotDetailsManu As String = ""
+ 'Dim shotDetailsName As String = ""
+ 'Dim shotDetailsQty As Double
+ 'Dim shotDetailsEpps As Double
+ 'Dim shotDetailsGr As Double
+ 'Dim isSlug As Boolean = False
+ 'Dim shotMaterial As String = ""
+ 'Dim shotShotNo As String = ""
+ 'Dim slugWeight As String = ""
+ 'Dim instockShotOz As Double
+ 'Dim prefLoad As String
+ 'Dim shotPrefload As Double
+ 'Dim costSlug As Double
+ 'Dim costShot As Double
+ 'Dim instockShot As Double
+ 'Dim instockSlug As Double
+ 'Dim wadManu As String = ""
+ 'Dim wadName As String = ""
+ 'Dim powderId As Long = 0
+ Dim powderDefault As Double
+ 'Dim powderManu As String = ""
+ 'Dim powderName As String = ""
+ 'Dim powderWeight As Double = 0
+ Dim shotSize As String = ""
+ Dim caseDetails As String = ""
+ Dim primerDetails As String = ""
+ Dim shotTypeId as Long = 0
+ Dim wadId As Long = 0
+
+ 'Dim prefferedPowderId As Long = objIm.GetPrefSGPowderID(configId, powWei)
+ Dim prefferedPowderId As Long = ConfigListDataPowder.GetDefaultPowderId(DatabasePath, configId, powderWeight, _errOut)
+ Dim lst As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, CInt(FirearmId), _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As FirearmCollection In lst
+ barrelLenght = o.Barrel
+ Next
+
+
+ ConfigListDataPowderShotGun.GetDefaultPowderId(DatabasePath, configId, powderDefault, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim powderList as List(Of PowderListing) = PowderInventory.GetDetails(DatabasePath, prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As PowderListing In powderList
+ powderDetails = $"{powderDefault} - {o.Manufacturer} {o.Name}"
+ Next
+
+ Dim configList As List(Of ConfigListDataShotgunData) = ConfigListDataShotgun.GetDetails(DatabasePath,
+ CInt(FirearmId), _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ConfigListDataShotgunData In configList
+ caliber = CaliberInventory.GetName(DatabasePath, o.CaliberId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ 'shotPrefload = o.ShotWeight
+ 'prefLoad = o.ShotWeightText
+ primerId = o.PrimerId
+ hullId = o.CaseId
+ shotTypeId = o.ShotChargeLoad
+ wadId = o.Wad
+ Next
+
+ Dim primerList As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, primerId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each p As PrimerListings In primerList
+ primerDetails = $"{p.Manufacturer} {p.Name}"
+ Next
+
+ Dim hullList As List(Of ShotgunHullData) = ShotgunHullInventory.GetDetails(DatabasePath, hullId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ShotgunHullData In hullList
+ caseDetails = $"DRAM: {o.DRAM} - {o.Manufacturer} - {o.Name}"
+ Next
+
+ Dim shotType as List(Of ShotgunShotTypeData) = ShotgunShotTypeInventory.GetDetails(DatabasePath, shotTypeId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ShotgunShotTypeData In shotType
+ If Not o.IsSlug Then
+ 'costShot = o.EstimatedPricePerItem
+ 'instockShot = o.Grams
+ shotSize = $"SLUG - {o.Manufacturer} - {o.Name}"
+ Else
+ 'costSlug = o.EstimatedPricePerItem
+ 'instockSlug = o.Qty
+ shotSize = shotSizeNo & $"{o.ShotNumber} - {o.Manufacturer} {o.Name}"
+ End If
+ Next
+
+ Dim wadList As List(Of WadData) = WadInventory.GetDetails(DatabasePath, wadId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As WadData In wadList
+ wad = $"{o.Manufacturer} {o.Name}"
+ Next
+
+
+ 'Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", "", strBarLen)
+ 'Call obj.ConnectDB()
+
+ 'Dim sql As String = "SELECT * from Config_List_Data_SG where CLNID=" & configId
+ 'Dim cmd As New OdbcCommand(sql, obj.Conn)
+ 'Dim rs As OdbcDataReader
+ 'rs = cmd.ExecuteReader
+ 'While rs.Read
+ ' 'LEFTOFF - adding config data to log
+ ' 'Subs are normally in the InvetoryMathSection
+ ' 'caliber = objIm.GetCaliber(rs("CALID"))
+
+ ' 'Call objIm.LoadPrimerInfo(rs("PRID"), primerManufacturer, primerName)
+ ' 'primerDetails = primerManufacturer & " " & primerName
+
+ ' 'Call objIm.LoadHullInfo(rs("CAID"), hullManufacturer, hullName, hullLength, 0, 0, hullDram)
+ ' 'caseDetails = "DRAM: " & hullDram & " - " & hullManufacturer & " " & hullName
+
+ ' 'Call objIm.LoadSG_ShotType_Details(rs("SCL"), shotDetailsManu, shotDetailsName, isSlug, _
+ ' ' shotMaterial, shotShotNo, slugWeight, "", shotDetailsQty, shotDetailsEpps, _
+ ' ' 0, instockShotOz, shotDetailsGr)
+ ' 'If Not IsDBNull(rs("SW_t")) Then prefLoad = rs("SW_t")
+ ' 'shotPrefload = rs("SW")
+ ' 'If Not isSlug Then
+ ' ' costShot = shotDetailsEpps
+ ' ' instockShot = shotDetailsGr
+ ' ' shotSize = "SLUG - " & shotDetailsManu & " - " & shotDetailsName
+ ' 'Else
+ ' ' costSlug = shotDetailsEpps
+ ' ' instockSlug = shotDetailsQty
+ ' ' shotSize = shotSizeNo & " - " & shotDetailsManu & " - " & shotDetailsName
+ ' 'End If
+
+ ' 'TODO: FINISHS THIS!!!
+ ' 'Loaders_Log_SG
+ ' 'THE SCL column is used for both Slug and Shot
+ ' 'load wad information
+ ' 'Call objIm.LoadWADInfo(rs("WAD"), wadManu, wadName, "", 0, 0, 0)
+ ' 'wad = wadManu & " " & wadName
+ ' 'load powder details into vars
+ ' powderId = objIm.GetPrefSGPowderIDID(configId, powderDefault)
+ ' Call objIm.GetPowderDetails(powderId, powderManu, powderName, 0, 0, 0, "", 0)
+ ' pbm = powderDefault & " - " & "Bushing" & powderManu & " " & powderName
+
+ 'End While
+
+ 'rs.Close()
+ 'rs = Nothing
+ 'cmd = Nothing
+ 'Dim sql = "INSERT INTO Loaders_Log_SG(fid,FirearmName,Caliber,BarrelLen,ConfigName,Shotwt,ShotSize,case,pbm,wad,primer,pd,yds,notes) VALUES(" & _
+ ' FirearmId & ",'" & firearmName & "','" & caliber & "','" & barrelLenght & "','" & configName & "','" & shotWt & "','" & shotSize & _
+ ' "','" & caseDetails & "','" & powderDetails & "','" & wad & "','" & primerDetails & "','" & pd & "'," & yards & ",'" & notes & "')"
+ If Not LoadersLogShotgun.Add(DatabasePath, FirearmId, firearmName, caliber, barrelLenght,
+ configName, dateCreated,shotWt,shotSize, caseDetails,
+ powderDetails,wad, primerDetails, pattern, yards,
+ notes, _errOut) Then Throw New Exception(_errOut)
+
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Updates the configuration list.
+ '''
+ Sub UpdateConfigList()
+ Try
+ 'Dim objGf As New GlobalFunctions
+ Dim lngFid As Long = cmbFirearm.SelectedValue
+ 'Dim strFireArm As String = ""
+ 'Dim strCal As String = ""
+ 'Call objGf.GetFirearmDetails(lngFid, 0, "", "", "", strCal)
+ Dim calId As Long = 0
+ Dim lst As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, CInt(lngFid), _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As FirearmCollection In lst
+ calId = GeneralFunctions.GetCaliberID(DatabasePath, o.Caliber, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Next
+ ConfigList_Simple_SGTableAdapter.FillBy_Caliber(MLLDataSet.ConfigList_Simple_SG, calId)
+ Catch ex As Exception
+ Call LogError(Name, "UpdateConfigList", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddDataSheet_ShotGun_CFG control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddDataSheet_ShotGun_CFG_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ Try
+ Loaders_Log_FirearmsTableAdapter.FillByFullNameShotgunOnly(MLLDataSet.Loaders_Log_Firearms)
+ cmbFirearm.SelectedValue = FirearmId
+ Call UpdateConfigList()
+ Call LoadAutoFill()
+ Catch ex As Exception
+ Call LogError(Name, "frmAddDataSheet_ShotGun_CFG_Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the SelectedIndexChanged event of the cmbFirearm control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub cmbFirearm_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbFirearm.SelectedIndexChanged
+ Call UpdateConfigList()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ End Class
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddEquipment.Designer.vb b/BSMyLoadersLog/Adding/frmAddEquipment.Designer.vb
index 3e8b4d9..c970fb7 100644
--- a/BSMyLoadersLog/Adding/frmAddEquipment.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddEquipment.Designer.vb
@@ -1,194 +1,196 @@
- _
-Partial Class frmAddEquipment
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddEquipment
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- MyBase.Dispose(disposing)
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddEquipment))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtUse = New System.Windows.Forms.TextBox
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.txtNotes = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 9)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 34)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 60)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(29, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Use:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 86)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(34, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Price:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 106)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(38, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Notes:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(91, 6)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(208, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(91, 31)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(208, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtUse
- '
- Me.txtUse.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtUse.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtUse.Location = New System.Drawing.Point(91, 57)
- Me.txtUse.Name = "txtUse"
- Me.txtUse.Size = New System.Drawing.Size(208, 20)
- Me.txtUse.TabIndex = 3
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(91, 83)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(208, 20)
- Me.txtPrice.TabIndex = 4
- '
- 'txtNotes
- '
- Me.txtNotes.Location = New System.Drawing.Point(14, 122)
- Me.txtNotes.Multiline = True
- Me.txtNotes.Name = "txtNotes"
- Me.txtNotes.Size = New System.Drawing.Size(285, 89)
- Me.txtNotes.TabIndex = 5
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(38, 224)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 6
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(189, 224)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 7
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmAddEquipment
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(308, 259)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtNotes)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtUse)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Adding Reloading Equipment")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Adding Reloading Equipment")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddEquipment"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Equipment to Inventory"
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddEquipment))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtUse = New System.Windows.Forms.TextBox
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.txtNotes = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 34)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 60)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(29, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Use:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 86)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(34, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Price:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 106)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(38, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Notes:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(91, 6)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(208, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(91, 31)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(208, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtUse
+ '
+ Me.txtUse.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtUse.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtUse.Location = New System.Drawing.Point(91, 57)
+ Me.txtUse.Name = "txtUse"
+ Me.txtUse.Size = New System.Drawing.Size(208, 20)
+ Me.txtUse.TabIndex = 3
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(91, 83)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(208, 20)
+ Me.txtPrice.TabIndex = 4
+ '
+ 'txtNotes
+ '
+ Me.txtNotes.Location = New System.Drawing.Point(14, 122)
+ Me.txtNotes.Multiline = True
+ Me.txtNotes.Name = "txtNotes"
+ Me.txtNotes.Size = New System.Drawing.Size(285, 89)
+ Me.txtNotes.TabIndex = 5
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(38, 224)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 6
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(189, 224)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 7
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmAddEquipment
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(308, 259)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtNotes)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtUse)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Adding Reloading Equipment")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Adding Reloading Equipment")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddEquipment"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Equipment to Inventory"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtUse As System.Windows.Forms.TextBox
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtNotes As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtUse As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtNotes As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddEquipment.vb b/BSMyLoadersLog/Adding/frmAddEquipment.vb
index 98a5adf..7f59b5d 100644
--- a/BSMyLoadersLog/Adding/frmAddEquipment.vb
+++ b/BSMyLoadersLog/Adding/frmAddEquipment.vb
@@ -1,59 +1,100 @@
-Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BSMyLoadersLog.Viewing
-Public Class frmAddEquipment
- Public FromView As Boolean
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections
- txtManu.AutoCompleteCustomSource = ObjAF.General_Equipment_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAF.General_Equipment_Name
- txtUse.AutoCompleteCustomSource = ObjAF.General_Equipment_Use
- txtPrice.AutoCompleteCustomSource = ObjAF.General_Equipment_Cost
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+Namespace Adding
+ '''
+ ''' Class frmAddEquipment.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddEquipment
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Automatics the fill.
+ '''
+ '''
+ Sub AutoFill()
+ Try
+ txtManu.AutoCompleteCustomSource = Equipment.Manufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = Equipment.Name(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtUse.AutoCompleteCustomSource = Equipment.Use(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = Equipment.Cost(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddEquipment control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddEquipment_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call AutoFill()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Clears the fields.
+ '''
+ Private Sub ClearFields()
+ txtManu.Text = ""
+ txtName.Text = ""
+ txtUse.Text = ""
+ txtPrice.Text = ""
+ txtNotes.Text = ""
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim strUse As String = GeneralHelpers.FluffContent(txtUse.Text)
+ Dim strPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
+ Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
- Private Sub frmAddEquipment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call AutoFill()
- End Sub
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strName, "Name", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strUse, "Use", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strPrice, 0, "Price", Text) Then Exit Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+ If Not EquipmentInventory.Add(DatabasePath, strManu, strName, strUse, strPrice,
+ strNotes, _errOut) Then Throw New Exception(_errOut)
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim strUse As String = GeneralHelpers.FluffContent(txtUse.Text)
- Dim strPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
- Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
-
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strUse, "Use", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strPrice, 0, "Price", Me.Text) Then Exit Sub
-
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO General_Equipment(Manufacturer,Name,Use,Cost,Notes) VALUES('" & _
- strManu & "','" & strName & "','" & strUse & "'," & strPrice & ",'" & strNotes & "')"
- Obj.ConnExec(SQL)
- Obj = Nothing
- Dim sAns As String = MsgBox("Equipment was added to the database, do you with to add another?", MsgBoxStyle.YesNo, Me.Text)
- If FromView Then Call frmView_List_Equipment.LoadData()
- If sAns = vbYes Then
- txtManu.Text = ""
- txtName.Text = ""
- txtUse.Text = ""
- txtPrice.Text = ""
- txtNotes.Text = ""
- Else
- Me.Close()
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ Dim sAns As String = MsgBox("Equipment was added to the database, do you with to add another?",
+ MsgBoxStyle.YesNo, Text)
+ If FromView Then Call FrmViewListEquipment.LoadData()
+ If sAns = vbYes Then
+ ClearFields()
+ Else
+ Close()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddFirearm.Designer.vb b/BSMyLoadersLog/Adding/frmAddFirearm.Designer.vb
index f5407fe..a25300e 100644
--- a/BSMyLoadersLog/Adding/frmAddFirearm.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddFirearm.Designer.vb
@@ -1,240 +1,242 @@
- _
-Partial Class frmAddFirearm
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddFirearm
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- MyBase.Dispose(disposing)
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddFirearm))
- Me.Label1 = New System.Windows.Forms.Label()
- Me.Label2 = New System.Windows.Forms.Label()
- Me.Label3 = New System.Windows.Forms.Label()
- Me.Label4 = New System.Windows.Forms.Label()
- Me.Label5 = New System.Windows.Forms.Label()
- Me.Label6 = New System.Windows.Forms.Label()
- Me.txtManu = New System.Windows.Forms.TextBox()
- Me.txtModel = New System.Windows.Forms.TextBox()
- Me.txtSerial = New System.Windows.Forms.TextBox()
- Me.txtCal = New System.Windows.Forms.TextBox()
- Me.txtType = New System.Windows.Forms.TextBox()
- Me.txtBarrel = New System.Windows.Forms.TextBox()
- Me.btnAdd = New System.Windows.Forms.Button()
- Me.btnCancel = New System.Windows.Forms.Button()
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider()
- Me.Label7 = New System.Windows.Forms.Label()
- Me.chkExlude = New System.Windows.Forms.CheckBox()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(13, 13)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(13, 39)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(39, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Model:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(13, 91)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Caliber:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(13, 142)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(73, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Barrel Lenght:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(13, 65)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(56, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Serial No.:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(13, 117)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(31, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Type"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(92, 10)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(149, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtModel
- '
- Me.txtModel.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtModel.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtModel.Location = New System.Drawing.Point(92, 36)
- Me.txtModel.Name = "txtModel"
- Me.txtModel.Size = New System.Drawing.Size(149, 20)
- Me.txtModel.TabIndex = 2
- '
- 'txtSerial
- '
- Me.txtSerial.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtSerial.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtSerial.Location = New System.Drawing.Point(92, 62)
- Me.txtSerial.Name = "txtSerial"
- Me.txtSerial.Size = New System.Drawing.Size(149, 20)
- Me.txtSerial.TabIndex = 3
- '
- 'txtCal
- '
- Me.txtCal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtCal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtCal.Location = New System.Drawing.Point(92, 88)
- Me.txtCal.Name = "txtCal"
- Me.txtCal.Size = New System.Drawing.Size(149, 20)
- Me.txtCal.TabIndex = 4
- '
- 'txtType
- '
- Me.txtType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtType.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtType.Location = New System.Drawing.Point(92, 114)
- Me.txtType.Name = "txtType"
- Me.txtType.Size = New System.Drawing.Size(149, 20)
- Me.txtType.TabIndex = 5
- '
- 'txtBarrel
- '
- Me.txtBarrel.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtBarrel.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtBarrel.Location = New System.Drawing.Point(92, 139)
- Me.txtBarrel.Name = "txtBarrel"
- Me.txtBarrel.Size = New System.Drawing.Size(149, 20)
- Me.txtBarrel.TabIndex = 6
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(30, 187)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 8
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.Location = New System.Drawing.Point(155, 186)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 9
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(13, 165)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(51, 13)
- Me.Label7.TabIndex = 9
- Me.Label7.Text = "Exclude?"
- '
- 'chkExlude
- '
- Me.chkExlude.AutoSize = True
- Me.chkExlude.Location = New System.Drawing.Point(92, 164)
- Me.chkExlude.Name = "chkExlude"
- Me.chkExlude.Size = New System.Drawing.Size(44, 17)
- Me.chkExlude.TabIndex = 7
- Me.chkExlude.Text = "Yes"
- Me.chkExlude.UseVisualStyleBackColor = True
- '
- 'frmAddFirearm
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(261, 228)
- Me.Controls.Add(Me.chkExlude)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtBarrel)
- Me.Controls.Add(Me.txtType)
- Me.Controls.Add(Me.txtCal)
- Me.Controls.Add(Me.txtSerial)
- Me.Controls.Add(Me.txtModel)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Adding a Firearm")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Adding a Firearm")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.Name = "frmAddFirearm"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Firearm"
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddFirearm))
+ Me.Label1 = New System.Windows.Forms.Label()
+ Me.Label2 = New System.Windows.Forms.Label()
+ Me.Label3 = New System.Windows.Forms.Label()
+ Me.Label4 = New System.Windows.Forms.Label()
+ Me.Label5 = New System.Windows.Forms.Label()
+ Me.Label6 = New System.Windows.Forms.Label()
+ Me.txtManu = New System.Windows.Forms.TextBox()
+ Me.txtModel = New System.Windows.Forms.TextBox()
+ Me.txtSerial = New System.Windows.Forms.TextBox()
+ Me.txtCal = New System.Windows.Forms.TextBox()
+ Me.txtType = New System.Windows.Forms.TextBox()
+ Me.txtBarrel = New System.Windows.Forms.TextBox()
+ Me.btnAdd = New System.Windows.Forms.Button()
+ Me.btnCancel = New System.Windows.Forms.Button()
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider()
+ Me.Label7 = New System.Windows.Forms.Label()
+ Me.chkExlude = New System.Windows.Forms.CheckBox()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(13, 13)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(13, 39)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(39, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Model:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(13, 91)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Caliber:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(13, 142)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(73, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Barrel Lenght:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(13, 65)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(56, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Serial No.:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(13, 117)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(31, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Type"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(92, 10)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(149, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtModel
+ '
+ Me.txtModel.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtModel.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtModel.Location = New System.Drawing.Point(92, 36)
+ Me.txtModel.Name = "txtModel"
+ Me.txtModel.Size = New System.Drawing.Size(149, 20)
+ Me.txtModel.TabIndex = 2
+ '
+ 'txtSerial
+ '
+ Me.txtSerial.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtSerial.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtSerial.Location = New System.Drawing.Point(92, 62)
+ Me.txtSerial.Name = "txtSerial"
+ Me.txtSerial.Size = New System.Drawing.Size(149, 20)
+ Me.txtSerial.TabIndex = 3
+ '
+ 'txtCal
+ '
+ Me.txtCal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCal.Location = New System.Drawing.Point(92, 88)
+ Me.txtCal.Name = "txtCal"
+ Me.txtCal.Size = New System.Drawing.Size(149, 20)
+ Me.txtCal.TabIndex = 4
+ '
+ 'txtType
+ '
+ Me.txtType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtType.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtType.Location = New System.Drawing.Point(92, 114)
+ Me.txtType.Name = "txtType"
+ Me.txtType.Size = New System.Drawing.Size(149, 20)
+ Me.txtType.TabIndex = 5
+ '
+ 'txtBarrel
+ '
+ Me.txtBarrel.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtBarrel.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtBarrel.Location = New System.Drawing.Point(92, 139)
+ Me.txtBarrel.Name = "txtBarrel"
+ Me.txtBarrel.Size = New System.Drawing.Size(149, 20)
+ Me.txtBarrel.TabIndex = 6
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(30, 187)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 8
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(155, 186)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 9
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(13, 165)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(51, 13)
+ Me.Label7.TabIndex = 9
+ Me.Label7.Text = "Exclude?"
+ '
+ 'chkExlude
+ '
+ Me.chkExlude.AutoSize = True
+ Me.chkExlude.Location = New System.Drawing.Point(92, 164)
+ Me.chkExlude.Name = "chkExlude"
+ Me.chkExlude.Size = New System.Drawing.Size(44, 17)
+ Me.chkExlude.TabIndex = 7
+ Me.chkExlude.Text = "Yes"
+ Me.chkExlude.UseVisualStyleBackColor = True
+ '
+ 'frmAddFirearm
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(261, 228)
+ Me.Controls.Add(Me.chkExlude)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtBarrel)
+ Me.Controls.Add(Me.txtType)
+ Me.Controls.Add(Me.txtCal)
+ Me.Controls.Add(Me.txtSerial)
+ Me.Controls.Add(Me.txtModel)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Adding a Firearm")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Adding a Firearm")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.Name = "frmAddFirearm"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Firearm"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtModel As System.Windows.Forms.TextBox
- Friend WithEvents txtSerial As System.Windows.Forms.TextBox
- Friend WithEvents txtCal As System.Windows.Forms.TextBox
- Friend WithEvents txtType As System.Windows.Forms.TextBox
- Friend WithEvents txtBarrel As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents chkExlude As System.Windows.Forms.CheckBox
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtModel As System.Windows.Forms.TextBox
+ Friend WithEvents txtSerial As System.Windows.Forms.TextBox
+ Friend WithEvents txtCal As System.Windows.Forms.TextBox
+ Friend WithEvents txtType As System.Windows.Forms.TextBox
+ Friend WithEvents txtBarrel As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents chkExlude As System.Windows.Forms.CheckBox
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddFirearm.vb b/BSMyLoadersLog/Adding/frmAddFirearm.vb
index 1933d55..283ee43 100644
--- a/BSMyLoadersLog/Adding/frmAddFirearm.vb
+++ b/BSMyLoadersLog/Adding/frmAddFirearm.vb
@@ -1,48 +1,58 @@
-Imports BSMyLoadersLog.LoadersClass
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.LoadersLog
-Public Class frmAddFirearm
- Public FromView As Boolean
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+Namespace Adding
+ '''
+ ''' Class FrmAddFirearm.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddFirearm
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strModel As String = GeneralHelpers.FluffContent(txtModel.Text)
+ Dim strSerial As String = GeneralHelpers.FluffContent(txtSerial.Text)
+ Dim strCal As String = GeneralHelpers.FluffContent(txtCal.Text)
+ Dim strBarrel As String = GeneralHelpers.FluffContent(txtBarrel.Text)
+ Dim strType As String = GeneralHelpers.FluffContent(txtType.Text)
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strModel As String = GeneralHelpers.FluffContent(txtModel.Text)
- Dim strSerial As String = GeneralHelpers.FluffContent(txtSerial.Text)
- Dim strCal As String = GeneralHelpers.FluffContent(txtCal.Text)
- Dim strBarrel As String = GeneralHelpers.FluffContent(txtBarrel.Text)
- Dim strType As String = GeneralHelpers.FluffContent(txtType.Text)
- Dim MGCID As Integer = 0
- Dim iExclude As Integer = 0
- If chkExlude.Checked Then iExclude = 1
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strModel, "model", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strSerial, "Serial Number", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strCal, "Caliber", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strType, "Type", Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strModel, "model", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strSerial, "Serial Number", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strCal, "Caliber", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strType, "Type", Me.Text) Then Exit Sub
+ If Not Firearms.Add(DatabasePath, strManu, strModel, strSerial, strCal,
+ strType, strBarrel, _errOut) Then Throw New Exception(_errOut)
- Dim strFullName As String = strManu & " " & strModel
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO Loaders_Log_Firearms (MGCID,FullName,Manu,Model,Cal,Barrel,SerialNo,GType,exclude)" & _
- " VALUES (" & MGCID & ",'" & strFullName & "','" & strManu & "','" & _
- strModel & "','" & strCal & "','" & strBarrel & "','" & strSerial & _
- "','" & strType & "'" & iExclude & ")"
- Obj.ConnExec(SQL)
- MsgBox(strFullName & " was added to the database!")
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ MsgBox(strManu & " " & strModel & " was added to the database!")
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddPowder.Designer.vb b/BSMyLoadersLog/Adding/frmAddPowder.Designer.vb
index b57e5a7..2b63734 100644
--- a/BSMyLoadersLog/Adding/frmAddPowder.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddPowder.Designer.vb
@@ -1,197 +1,199 @@
- _
-Partial Class frmAddPowder
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddPowder
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddPowder))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtwei = New System.Windows.Forms.TextBox
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.txtNotes = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 15)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 40)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 66)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(117, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Weight In Pounds (lbs):"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 92)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(34, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Price:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 115)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(38, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Notes:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(138, 12)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(171, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(138, 37)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(171, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtwei
- '
- Me.txtwei.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtwei.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtwei.Location = New System.Drawing.Point(138, 63)
- Me.txtwei.Name = "txtwei"
- Me.txtwei.Size = New System.Drawing.Size(171, 20)
- Me.txtwei.TabIndex = 3
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(138, 89)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(171, 20)
- Me.txtPrice.TabIndex = 4
- '
- 'txtNotes
- '
- Me.txtNotes.Location = New System.Drawing.Point(15, 132)
- Me.txtNotes.Multiline = True
- Me.txtNotes.Name = "txtNotes"
- Me.txtNotes.Size = New System.Drawing.Size(294, 71)
- Me.txtNotes.TabIndex = 5
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(54, 209)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 6
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(188, 209)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 7
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmAddPowder
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(318, 240)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtNotes)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtwei)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add Powder To Inventory")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add Powder To Inventory")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddPowder"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Powder to Inventory"
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddPowder))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtwei = New System.Windows.Forms.TextBox
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.txtNotes = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 15)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 40)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 66)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(117, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Weight In Pounds (lbs):"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 92)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(34, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Price:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 115)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(38, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Notes:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(138, 12)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(171, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(138, 37)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(171, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtwei
+ '
+ Me.txtwei.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtwei.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtwei.Location = New System.Drawing.Point(138, 63)
+ Me.txtwei.Name = "txtwei"
+ Me.txtwei.Size = New System.Drawing.Size(171, 20)
+ Me.txtwei.TabIndex = 3
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(138, 89)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(171, 20)
+ Me.txtPrice.TabIndex = 4
+ '
+ 'txtNotes
+ '
+ Me.txtNotes.Location = New System.Drawing.Point(15, 132)
+ Me.txtNotes.Multiline = True
+ Me.txtNotes.Name = "txtNotes"
+ Me.txtNotes.Size = New System.Drawing.Size(294, 71)
+ Me.txtNotes.TabIndex = 5
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(54, 209)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 6
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(188, 209)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 7
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmAddPowder
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(318, 240)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtNotes)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtwei)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add Powder To Inventory")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add Powder To Inventory")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddPowder"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Powder to Inventory"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtwei As System.Windows.Forms.TextBox
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtNotes As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtwei As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtNotes As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddPowder.vb b/BSMyLoadersLog/Adding/frmAddPowder.vb
index c08d4f2..9efd55e 100644
--- a/BSMyLoadersLog/Adding/frmAddPowder.vb
+++ b/BSMyLoadersLog/Adding/frmAddPowder.vb
@@ -1,54 +1,81 @@
-Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
-Imports BurnSoft.Applications.MLL.Global
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddPowder
- Dim errOut As String
- Public FromView As Boolean
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections
- txtManu.AutoCompleteCustomSource = ObjAF.General_Powder_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAF.General_Powder_Name
- txtPrice.AutoCompleteCustomSource = ObjAF.General_Powder_Price
- txtwei.AutoCompleteCustomSource = ObjAF.General_Powder_WeightInPounds
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim dbWei As Double = GeneralHelpers.FluffContent(CDbl(txtwei.Text), 0)
- Dim dbWeiGrn As Double =Converters.ConvertWeight(dbWei, WeightValues.WeightType.Grains,
- WeightValues.WeightType.Pounds, errOut)
- Dim dbPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
- Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- Dim EstCostPerItem As Double = 0
- If dbPrice <> 0 Then
- EstCostPerItem = (dbPrice / dbWeiGrn)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO General_Powder(Manufacturer,Name," & _
- "weightlbs,weightgn,Price,Notes,ePPP) VALUES ('" & strManu & "','" & _
- strName & "'," & dbWei & "," & dbWeiGrn & "," & dbPrice & ",'" & _
- strNotes & "'," & EstCostPerItem & ")"
- Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Powder.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+Namespace Adding
+ '''
+ ''' Class FrmAddPowder.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddPowder
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Automatics the fill.
+ '''
+ '''
+ Sub AutoFill()
+ Try
+ txtManu.AutoCompleteCustomSource = Powder.Manufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = Powder.Name(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = Powder.Price(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtwei.AutoCompleteCustomSource = Powder.Weightlbs(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim dbWei As Double = GeneralHelpers.FluffContent(txtwei.Text, 0)
+ Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
+ Dim strNotes As String = GeneralHelpers.FluffContent(txtNotes.Text)
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strName, "Name", Text) Then Exit Sub
+
+ If Not PowderInventory.Add(DatabasePath, strManu, strName, dbWei,
+ dbPrice, strNotes, _errOut) Then Throw New Exception(_errOut)
- Private Sub frmAddPowder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call AutoFill()
- End Sub
-End Class
\ No newline at end of file
+ If FromView Then Call FrmViewListPowder.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddPowder control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddPowder_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call AutoFill()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddPrimer.Designer.vb b/BSMyLoadersLog/Adding/frmAddPrimer.Designer.vb
index 407d8bd..511bdd1 100644
--- a/BSMyLoadersLog/Adding/frmAddPrimer.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddPrimer.Designer.vb
@@ -1,226 +1,228 @@
- _
-Partial Class frmAddPrimer
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddPrimer
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddPrimer))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.cmbPriType = New System.Windows.Forms.ComboBox
- Me.GeneralPrimerTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.General_Primer_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(9, 12)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(9, 38)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 65)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Primer Type:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(9, 91)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(26, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Qty:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(9, 118)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Price:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(89, 9)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(166, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(89, 35)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(166, 20)
- Me.txtName.TabIndex = 2
- '
- 'cmbPriType
- '
- Me.cmbPriType.DataSource = Me.GeneralPrimerTypeBindingSource
- Me.cmbPriType.DisplayMember = "Name"
- Me.cmbPriType.FormattingEnabled = True
- Me.cmbPriType.Location = New System.Drawing.Point(89, 62)
- Me.cmbPriType.Name = "cmbPriType"
- Me.cmbPriType.Size = New System.Drawing.Size(166, 21)
- Me.cmbPriType.TabIndex = 3
- Me.cmbPriType.ValueMember = "ID"
- '
- 'GeneralPrimerTypeBindingSource
- '
- Me.GeneralPrimerTypeBindingSource.DataMember = "General_Primer_Type"
- Me.GeneralPrimerTypeBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(89, 89)
- Me.nudQty.Maximum = New Decimal(New Integer() {10000000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(166, 20)
- Me.nudQty.TabIndex = 4
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(89, 115)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(166, 20)
- Me.txtPrice.TabIndex = 5
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(36, 156)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 6
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(154, 156)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 7
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'General_Primer_TypeTableAdapter
- '
- Me.General_Primer_TypeTableAdapter.ClearBeforeFill = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmAddPrimer
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(266, 191)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.cmbPriType)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add Primers to Inventory")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add Primers to Inventory")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddPrimer"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Primer to Inventory"
- CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddPrimer))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.cmbPriType = New System.Windows.Forms.ComboBox
+ Me.GeneralPrimerTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.General_Primer_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(9, 12)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(9, 38)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 65)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(66, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Primer Type:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(9, 91)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(26, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Qty:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(9, 118)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Price:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(89, 9)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(166, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(89, 35)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(166, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'cmbPriType
+ '
+ Me.cmbPriType.DataSource = Me.GeneralPrimerTypeBindingSource
+ Me.cmbPriType.DisplayMember = "Name"
+ Me.cmbPriType.FormattingEnabled = True
+ Me.cmbPriType.Location = New System.Drawing.Point(89, 62)
+ Me.cmbPriType.Name = "cmbPriType"
+ Me.cmbPriType.Size = New System.Drawing.Size(166, 21)
+ Me.cmbPriType.TabIndex = 3
+ Me.cmbPriType.ValueMember = "ID"
+ '
+ 'GeneralPrimerTypeBindingSource
+ '
+ Me.GeneralPrimerTypeBindingSource.DataMember = "General_Primer_Type"
+ Me.GeneralPrimerTypeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(89, 89)
+ Me.nudQty.Maximum = New Decimal(New Integer() {10000000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(166, 20)
+ Me.nudQty.TabIndex = 4
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(89, 115)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(166, 20)
+ Me.txtPrice.TabIndex = 5
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(36, 156)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 6
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(154, 156)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 7
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'General_Primer_TypeTableAdapter
+ '
+ Me.General_Primer_TypeTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmAddPrimer
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(266, 191)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.cmbPriType)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add Primers to Inventory")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add Primers to Inventory")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddPrimer"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Primer to Inventory"
+ CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents cmbPriType As System.Windows.Forms.ComboBox
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents GeneralPrimerTypeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_Primer_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents cmbPriType As System.Windows.Forms.ComboBox
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents GeneralPrimerTypeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_Primer_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddPrimer.vb b/BSMyLoadersLog/Adding/frmAddPrimer.vb
index c395021..d6a6864 100644
--- a/BSMyLoadersLog/Adding/frmAddPrimer.vb
+++ b/BSMyLoadersLog/Adding/frmAddPrimer.vb
@@ -1,56 +1,90 @@
-Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddPrimer
- Public FromView As Boolean
- Sub LoadData()
- Try
- Call AutoFill()
- Me.General_Primer_TypeTableAdapter.Fill(Me.MLLDataSet.General_Primer_Type)
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddPrimer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections
- txtManu.AutoCompleteCustomSource = ObjAF.General_Primer_Type_ManuFacturers
- txtName.AutoCompleteCustomSource = ObjAF.General_Primer_Type_Name
- txtPrice.AutoCompleteCustomSource = ObjAF.General_Primer_Type_Price
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim intPriType As Integer = cmbPriType.SelectedValue
- Dim intQty As Integer = nudQty.Value
- Dim dbPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
+Namespace Adding
+ '''
+ ''' Class FrmAddPrimer.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddPrimer
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ Call AutoFill()
+ General_Primer_TypeTableAdapter.Fill(MLLDataSet.General_Primer_Type)
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddPrimer control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddPrimer_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Automatics the fill.
+ '''
+ Sub AutoFill()
+ Try
+ txtManu.AutoCompleteCustomSource = Primers.Manufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = Primers.Name(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = Primers.Price(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim intPriType As Integer = cmbPriType.SelectedValue
+ Dim intQty As Integer = nudQty.Value
+ Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- Dim EstCostPerItem As Double = 0
- If dbPrice <> 0 Then
- EstCostPerItem = (dbPrice / intQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO General_Primer(Manufacturer,Name,Primer_Type," & _
- "Qty,Price, ePPP) VALUES('" & strManu & "','" & strName & "'," & intPriType & "," & _
- intQty & "," & dbPrice & "," & EstCostPerItem & ")"
- Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Primer.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer",
+ Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strName, "Name",
+ Text) Then Exit Sub
+ If Not PrimerInventory.Add(DatabasePath, strManu, strName, intPriType,
+ dbPrice, intQty, _errOut) Then Throw New Exception(_errOut)
+
+ If FromView Then Call FrmViewListPrimer.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyBullets.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyBullets.Designer.vb
index cae988d..7c3b0e6 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyBullets.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyBullets.Designer.vb
@@ -1,256 +1,258 @@
- _
-Partial Class frmAddQtyBullets
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyBullets
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyBullets))
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.txtCPPI = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnViewCalc = New System.Windows.Forms.Button
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.txtUPPI = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(3, 2)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(3, 99)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(12, 225)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 4
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(131, 225)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 5
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'frmAddQtyBullets
- '
- Me.AcceptButton = Me.btnUpdate
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(224, 260)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyBullets"
- Me.Text = "Update Bullet Qty"
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyBullets))
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.txtCPPI = New System.Windows.Forms.TextBox
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.btnViewCalc = New System.Windows.Forms.Button
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.txtUPPI = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.GroupBox1.SuspendLayout()
+ Me.GroupBox2.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(3, 2)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 0
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(3, 99)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 1
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(12, 225)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 4
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(131, 225)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 5
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'frmAddQtyBullets
+ '
+ Me.AcceptButton = Me.btnUpdate
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(224, 260)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyBullets"
+ Me.Text = "Update Bullet Qty"
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
-End Class
+ End Sub
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyBullets.vb b/BSMyLoadersLog/Adding/frmAddQtyBullets.vb
index 6695d13..6cdf688 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyBullets.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyBullets.vb
@@ -1,93 +1,102 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtyBullets
- Public BID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim SQL As String = "SELECT * from List_Bullets where ID=" & BID
- Dim Obj As New BSDatabase
- Dim ObjIM As New InventoryMath
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("ePPB")) Then eppo = RS("ePPB")
- txtCQty.Text = iQty
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- txtCPPI.Text = ObjIM.ConvertToDollars(eppo)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtCQty.Text), 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPrice.Text), 0))
- Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPPI.Text), 0))
- Dim UQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0))
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
+ '''
+ ''' Class FrmAddQtyBullets.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddQtyBullets
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The bullet identifier
+ '''
+ Public BulletId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+
+ '''
+ ''' Loads the data.
+ '''
+ '''
+ Sub LoadData()
+ Try
+ Dim lst as List(Of BulletListings) = BulletsInventory.GetDetails(DatabasePath, BulletId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As BulletListings In lst
+ txtCQty.Text = o.Qty
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ txtCPPI.Text = Converters.ConvertToDollars(o.EsitmatedPricePerBullet)
+ Next
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ '''
+ Sub SaveData()
+ Try
+ Dim currentQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
+ Dim currentPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
+ Dim currentPricePerItem As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
+ Dim newQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
+ Dim newPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
+ If Not GeneralHelpers.IsRequired(newQty, "Update Qty", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(newPrice, "Update Price", Text) Then Exit Sub
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE List_Bullets set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & BID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE List_Bullets set QTY=0, Price=0, eppb=0 where ID=" & BID
- Else
- SQL = "UPDATE List_Bullets set QTY=" & NQty & ", Price=" & NPrice & ", eppb=" & NPPI & " where ID=" & BID
- End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyBullets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(txtUQty.Text), CDbl(txtUPrice.Text))
- End Sub
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Try
- Call SaveData()
- If FromView Then Call frmView_List_Bullets.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ If Not BulletsInventory.UpdateQty(DatabasePath, BulletId, currentQty, currentPrice, currentPricePerItem,
+ newQty, newPrice, _errOut) Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtyBullets control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtyBullets_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnViewCalc control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnViewCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnViewCalc.Click
+ txtUPPI.Text = CDbl(txtUPrice.Text) / CLng(txtUQty.Text)
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Try
+ Call SaveData()
+ If FromView Then Call FrmViewListBullets.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyHulls.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyHulls.Designer.vb
index 2625b52..1b7539d 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyHulls.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyHulls.Designer.vb
@@ -1,255 +1,257 @@
- _
-Partial Class frmAddQtyHulls
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyHulls
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyHulls))
- Me.btnCancel = New System.Windows.Forms.Button()
- Me.btnUpdate = New System.Windows.Forms.Button()
- Me.GroupBox2 = New System.Windows.Forms.GroupBox()
- Me.btnViewCalc = New System.Windows.Forms.Button()
- Me.txtUPrice = New System.Windows.Forms.TextBox()
- Me.txtUQty = New System.Windows.Forms.TextBox()
- Me.txtUPPI = New System.Windows.Forms.TextBox()
- Me.Label4 = New System.Windows.Forms.Label()
- Me.Label5 = New System.Windows.Forms.Label()
- Me.Label6 = New System.Windows.Forms.Label()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
- Me.txtCPrice = New System.Windows.Forms.TextBox()
- Me.txtCQty = New System.Windows.Forms.TextBox()
- Me.txtCPPI = New System.Windows.Forms.TextBox()
- Me.Label3 = New System.Windows.Forms.Label()
- Me.Label2 = New System.Windows.Forms.Label()
- Me.Label1 = New System.Windows.Forms.Label()
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(140, 235)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 17
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(23, 235)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 16
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(12, 109)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 15
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 14
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'frmAddQtyHulls
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(238, 262)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyHulls"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
- Me.Text = "Update Hull Qty,"
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyHulls))
+ Me.btnCancel = New System.Windows.Forms.Button()
+ Me.btnUpdate = New System.Windows.Forms.Button()
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox()
+ Me.btnViewCalc = New System.Windows.Forms.Button()
+ Me.txtUPrice = New System.Windows.Forms.TextBox()
+ Me.txtUQty = New System.Windows.Forms.TextBox()
+ Me.txtUPPI = New System.Windows.Forms.TextBox()
+ Me.Label4 = New System.Windows.Forms.Label()
+ Me.Label5 = New System.Windows.Forms.Label()
+ Me.Label6 = New System.Windows.Forms.Label()
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox()
+ Me.txtCPrice = New System.Windows.Forms.TextBox()
+ Me.txtCQty = New System.Windows.Forms.TextBox()
+ Me.txtCPPI = New System.Windows.Forms.TextBox()
+ Me.Label3 = New System.Windows.Forms.Label()
+ Me.Label2 = New System.Windows.Forms.Label()
+ Me.Label1 = New System.Windows.Forms.Label()
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(140, 235)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 17
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(23, 235)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 16
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(12, 109)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 15
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 14
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'frmAddQtyHulls
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(238, 262)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyHulls"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
+ Me.Text = "Update Hull Qty,"
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyHulls.vb b/BSMyLoadersLog/Adding/frmAddQtyHulls.vb
index cbae083..9c63a68 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyHulls.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyHulls.vb
@@ -1,98 +1,104 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+Imports System.Data.Odbc
+Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
-Public Class frmAddQtyHulls
- Public SID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from List_SG_Case where ID=" & SID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim TimesUsed As Long = 0
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("ePPs")) Then eppo = RS("ePPs")
- txtCQty.Text = iQty
- txtCPPI.Text = eppo
- Dim ObjIM As New InventoryMath
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtCQty.Text), 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPrice.Text), 0))
- Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPPI.Text), 0))
- Dim UQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0))
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE List_SG_Case set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & SID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE List_SG_Case set QTY=0, Price=0, epps=0 where ID=" & SID
- Else
- SQL = "UPDATE List_SG_Case set QTY=" & NQty & ", Price=" & NPrice & ", epps=" & NPPI & " where ID=" & SID
+ Public Class FrmAddQtyHulls
+ ' TODO: #33 Update when this function as been added to the library.
+ Dim errOut As String
+ Public SID As Long
+ Public FromView As Boolean
+ Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ Dim dAns As Double = 0
+ 'Dim ObjIM As New InventoryMath
+ If lQty > 0 Then
+ dAns = dPrice / lQty
End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyHulls_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
+ 'Converters.ConvertToDollars(dAns)
+ Return Converters.ConvertToDollars(dAns)
+ End Function
+ Sub LoadData()
+ Try
+ Dim Obj As New BSDatabase
+ Call Obj.ConnectDB()
+ Dim SQL As String = "SELECT * from List_SG_Case where ID=" & SID
+ Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ Dim RS As OdbcDataReader
+ RS = CMD.ExecuteReader
+ Dim TimesUsed As Long = 0
+ Dim iQty As Integer = 0
+ Dim eppo As Double = 0
+ Dim dPrice As Double = 0
+ While RS.Read
+ If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ If Not IsDBNull(RS("ePPs")) Then eppo = RS("ePPs")
+ txtCQty.Text = iQty
+ txtCPPI.Text = eppo
+ Dim ObjIM As New InventoryMath
+ 'txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ End While
+ RS.Close()
+ RS = Nothing
+ CMD = Nothing
+ Call Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ Sub SaveData()
+ Try
+ Dim CQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtCQty.Text), 0))
+ Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPrice.Text), 0))
+ Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtCPPI.Text), 0))
+ Dim UQty As Long = CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0))
+ Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0))
+ Dim UPPI As Double = PricePerItem(UQty, UPrice)
+ txtUPPI.Text = UPPI
+ If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
- Private Sub btnViewCalc_Click(sender As System.Object, e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0)),
- CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)))
- End Sub
+ Dim NQty As Long = CQty + UQty
+ Dim NPrice As Double = (CQty * CPPI) + UPrice
+ Dim NPPI As Double = PricePerItem(NQty, NPrice)
+ Dim SQL As String = ""
+ Dim Obj As New BSDatabase
+ If CPPI = UPPI Then
+ SQL = "UPDATE List_SG_Case set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & SID
+ ElseIf UPrice = 0 And UQty = 0 Then
+ SQL = "UPDATE List_SG_Case set QTY=0, Price=0, epps=0 where ID=" & SID
+ Else
+ SQL = "UPDATE List_SG_Case set QTY=" & NQty & ", Price=" & NPrice & ", epps=" & NPPI & " where ID=" & SID
+ End If
+ Obj.ConnExec(SQL)
+ Catch ex As Exception
+ Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ Private Sub frmAddQtyHulls_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
- Private Sub btnUpdate_Click(sender As System.Object, e As System.EventArgs) Handles btnUpdate.Click
- Try
- Call SaveData()
- If FromView Then Call FrmViewListShells.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+ Private Sub btnViewCalc_Click(sender As System.Object, e As System.EventArgs) Handles btnViewCalc.Click
+ txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0)),
+ CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)))
+ End Sub
+
+ Private Sub btnUpdate_Click(sender As System.Object, e As System.EventArgs) Handles btnUpdate.Click
+ Try
+ Call SaveData()
+ If FromView Then Call FrmViewListShells.LoadData()
+ Me.Close()
+ Catch ex As Exception
+ Call LogError(Me.Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
- Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-End Class
\ No newline at end of file
+ Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
+ Me.Close()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyPowder.vb b/BSMyLoadersLog/Adding/frmAddQtyPowder.vb
index bc1cd11..97b474e 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyPowder.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyPowder.vb
@@ -10,19 +10,19 @@ Public Class frmAddQtyPowder
Public FromView As Boolean
Function PricePerItem(ByVal lValue As Long, ByVal dPrice As Double, ByVal sType As String) As Double
Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
+ 'Dim ObjIM As New InventoryMath
Dim lNewValue As Long = 0
Select Case sType
Case "Grains (grs)"
lNewValue = lValue
Case "Pounds (lbs)"
- lNewValue = lValue * WeightGrains1Lbs
+ lNewValue = lValue * WeightValues.WEIGHT_GRAINS_1LBS
End Select
If lValue > 0 Then
dAns = dPrice / lNewValue
End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
+ 'Converters.ConvertToDollars(dAns)
+ Return Converters.ConvertToDollars( dAns)
End Function
Sub LoadData()
Try
@@ -42,8 +42,9 @@ Public Class frmAddQtyPowder
If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
txtCQty2.Text = iQty
txtCPPI.Text = eppo
- Dim ObjIM As New InventoryMath
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
+ 'Dim ObjIM As New InventoryMath
+ 'txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ txtCPrice.Text = Converters.ConvertToDollars(dPrice)
End While
RS.Close()
RS = Nothing
@@ -102,7 +103,7 @@ Public Class frmAddQtyPowder
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Call SaveData()
- If FromView Then Call frmView_List_Powder.LoadData()
+ If FromView Then Call FrmViewListPowder.LoadData()
Me.Close()
End Sub
Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
diff --git a/BSMyLoadersLog/Adding/frmAddQtyPrimers.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyPrimers.Designer.vb
index ce8fbaa..e9153f8 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyPrimers.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyPrimers.Designer.vb
@@ -1,256 +1,258 @@
- _
-Partial Class frmAddQtyPrimers
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyPrimers
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyPrimers))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnViewCalc = New System.Windows.Forms.Button
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.txtUPPI = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.txtCPPI = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(129, 226)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 9
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(12, 226)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 8
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(1, 100)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 7
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(1, 3)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 6
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'frmAddQtyPrimers
- '
- Me.AcceptButton = Me.btnUpdate
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(223, 258)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyPrimers"
- Me.Text = "Update Primer Qty"
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyPrimers))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.btnViewCalc = New System.Windows.Forms.Button
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.txtUPPI = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.txtCPPI = New System.Windows.Forms.TextBox
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(129, 226)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 9
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(12, 226)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 8
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(1, 100)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 7
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(1, 3)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 6
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'frmAddQtyPrimers
+ '
+ Me.AcceptButton = Me.btnUpdate
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(223, 258)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyPrimers"
+ Me.Text = "Update Primer Qty"
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyPrimers.vb b/BSMyLoadersLog/Adding/frmAddQtyPrimers.vb
index 77c42af..7cf7359 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyPrimers.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyPrimers.vb
@@ -1,94 +1,155 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtyPrimers
- Public PID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from General_Primer where ID=" & PID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
- txtCQty.Text = iQty
- txtCPPI.Text = eppo
- Dim ObjIM As New InventoryMath
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim CQty As Long = GeneralHelpers.FluffContent(CLng(txtCQty.Text), 0)
- Dim CPrice As Double = GeneralHelpers.FluffContent(CDbl(txtCPrice.Text), 0)
- Dim CPPI As Double = GeneralHelpers.FluffContent(CDbl(txtCPPI.Text), 0)
- Dim UQty As Long = GeneralHelpers.FluffContent(CLng(txtUQty.Text), 0)
- Dim UPrice As Double = GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
+ ' TODO: #20 clean up code
+ '''
+ ''' Class frmAddQtyPrimers.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddQtyPrimers
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as string
+ '''
+ ''' The primer identifier
+ '''
+ Public PrimerId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE General_Primer set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & pID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE General_Primer set QTY=0, Price=0, eppp=0 where ID=" & pID
- Else
- SQL = "UPDATE General_Primer set QTY=" & NQty & ", Price=" & NPrice & ", eppp=" & NPPI & " where ID=" & PID
- End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Try
- Call SaveData()
- If FromView Then Call frmView_List_Primer.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyPrimers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
- Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0)),
- CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)))
- End Sub
-End Class
\ No newline at end of file
+ 'Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ ' Dim dAns As Double = 0
+ ' Dim ObjIM As New InventoryMath
+ ' If lQty > 0 Then
+ ' dAns = dPrice / lQty
+ ' End If
+ ' Converters.ConvertToDollars(dAns)
+ ' Return dAns
+ 'End Function
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ Dim lst As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, PrimerId, _errOut)
+ If _errOut.Length > 0 then Throw New Exception(_errOut)
+ For Each o As PrimerListings In lst
+ txtCQty.Text = o.Qty
+ txtCPPI.Text = o.PricePerPrimer
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ Next
+ 'Dim Obj As New BSDatabase
+ 'Call Obj.ConnectDB()
+ 'Dim SQL As String = "SELECT * from General_Primer where ID=" & PrimerId
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
+ ' txtCQty.Text = iQty
+ ' txtCPPI.Text = eppo
+ ' Dim ObjIM As New InventoryMath
+ ' txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim currentQty As Long = GeneralHelpers.FluffContent(CLng(txtCQty.Text), 0)
+ Dim currentPrice As Double = GeneralHelpers.FluffContent(CDbl(txtCPrice.Text), 0)
+ Dim currentPricePerItem As Double = GeneralHelpers.FluffContent(CDbl(txtCPPI.Text), 0)
+ Dim newQty As Long = GeneralHelpers.FluffContent(CLng(txtUQty.Text), 0)
+ Dim newPrice As Double = GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)
+ 'Dim UPPI As Double = PricePerItem(newQty, newPrice)
+ 'txtUPPI.Text = UPPI
+ If Not GeneralHelpers.IsRequired(newQty, "Update Qty", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(newPrice, "Update Price", Text) Then Exit Sub
+ If Not PrimerInventory.UpdateQty(DatabasePath, PrimerID, currentQty, currentPrice, currentPricePerItem,
+ newQty, newPrice, _errOut) Then throw new Exception(_errOut)
+ 'Dim NQty As Long = currentQty + newQty
+ 'Dim NPrice As Double = (currentQty * currentPricePerItem) + newPrice
+ 'Dim NPPI As Double = PricePerItem(NQty, NPrice)
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ 'If currentPricePerItem = UPPI Then
+ ' SQL = "UPDATE General_Primer set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & PrimerId
+ 'ElseIf newPrice = 0 And newQty = 0 Then
+ ' SQL = "UPDATE General_Primer set QTY=0, Price=0, eppp=0 where ID=" & PrimerId
+ 'Else
+ ' SQL = "UPDATE General_Primer set QTY=" & NQty & ", Price=" & NPrice & ", eppp=" & NPPI & " where ID=" & PrimerId
+ 'End If
+ 'Obj.ConnExec(SQL)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Try
+ Call SaveData()
+ If FromView Then Call FrmViewListPrimer.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtyPrimers control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtyPrimers_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnViewCalc control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnViewCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnViewCalc.Click
+ try
+ 'txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0)),
+ ' CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)))
+ txtUPPI.Text = PrimerInventory.CalculatePricePerItem(CLng(GeneralHelpers.FluffContent(CDbl(txtUQty.Text), 0)),
+ CDbl(GeneralHelpers.FluffContent(CDbl(txtUPrice.Text), 0)))
+ Catch ex As Exception
+ Call LogError(Name, "btnViewCalc_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyShellcase.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyShellcase.Designer.vb
index fd10595..78a3b19 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyShellcase.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyShellcase.Designer.vb
@@ -1,256 +1,258 @@
- _
-Partial Class frmAddQtyShellcase
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyShellcase
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyShellcase))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnViewCalc = New System.Windows.Forms.Button
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.txtUPPI = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.txtCPPI = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(130, 226)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 13
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(13, 226)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 12
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(2, 100)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 11
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(2, 3)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 10
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'frmAddQtyShellcase
- '
- Me.AcceptButton = Me.btnUpdate
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(225, 257)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyShellcase"
- Me.Text = "Update Shell Case Qty"
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyShellcase))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.btnViewCalc = New System.Windows.Forms.Button
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.txtUPPI = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.txtCPPI = New System.Windows.Forms.TextBox
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(130, 226)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 13
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(13, 226)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 12
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(2, 100)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 11
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(2, 3)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 10
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'frmAddQtyShellcase
+ '
+ Me.AcceptButton = Me.btnUpdate
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(225, 257)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyShellcase"
+ Me.Text = "Update Shell Case Qty"
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyShellcase.vb b/BSMyLoadersLog/Adding/frmAddQtyShellcase.vb
index a1f5d39..0f054fe 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyShellcase.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyShellcase.vb
@@ -1,95 +1,162 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data.Odbc
Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtyShellcase
- Public SID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from List_Case where ID=" & SID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim TimesUsed As Long = 0
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("ePPC")) Then eppo = RS("ePPC")
- txtCQty.Text = iQty
- txtCPPI.Text = eppo
- Dim ObjIM As New InventoryMath
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
- Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
- Dim UQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE List_Case set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & SID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE List_Case set QTY=0, Price=0, eppc=0 where ID=" & SID
- Else
- SQL = "UPDATE List_Case set QTY=" & NQty & ", Price=" & NPrice & ", eppc=" & NPPI & " where ID=" & SID
- End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)),
- CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)))
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Try
- Call SaveData()
- If FromView Then Call FrmViewListShells.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyShellcase_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
-End Class
\ No newline at end of file
+ '''
+ ''' Class frmAddQtyShellcase.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddQtyShellcase
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The case identifier
+ '''
+ Public CaseId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ 'Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ ' Dim dAns As Double = 0
+ ' Dim ObjIM As New InventoryMath
+ ' If lQty > 0 Then
+ ' dAns = dPrice / lQty
+ ' End If
+ ' Converters.ConvertToDollars(dAns)
+ ' Return dAns
+ 'End Function
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ Dim lst As List(Of CaseListings) = CaseInventory.GetDetails(DatabasePath, CaseId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As CaseListings In lst
+ txtCQty.Text = o.Qty
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ txtCPPI.Text = Converters.ConvertToDollars(o.EstimatedPricePerCase)
+ Next
+ 'Dim Obj As New BSDatabase
+ 'Call Obj.ConnectDB()
+ 'Dim SQL As String = "SELECT * from List_Case where ID=" & CaseId
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim TimesUsed As Long = 0
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("ePPC")) Then eppo = RS("ePPC")
+ ' txtCQty.Text = iQty
+ ' txtCPPI.Text = eppo
+ ' Dim ObjIM As New InventoryMath
+ ' txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Call Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim currentQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
+ Dim currentPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
+ Dim currentPricePerItem As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
+ Dim newQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
+ Dim newPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
+ 'Dim UPPI As Double = PricePerItem(newQty, newPrice)
+ 'txtUPPI.Text = UPPI
+ If Not GeneralHelpers.IsRequired(newQty, "Update Qty", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(newPrice, "Update Price", Text) Then Exit Sub
+
+ If Not CaseInventory.UpdateQty(DatabasePath, CaseId, currentQty, currentPrice,
+ currentPricePerItem, newQty, newPrice,
+ _errOut) Then Throw New Exception(_errOut)
+
+ 'Dim NQty As Long = currentQty + newQty
+ 'Dim NPrice As Double = (currentQty * currentPricePerItem) + newPrice
+ 'Dim NPPI As Double = PricePerItem(NQty, NPrice)
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ 'If currentPricePerItem = UPPI Then
+ ' SQL = "UPDATE List_Case set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & CaseId
+ 'ElseIf newPrice = 0 And newQty = 0 Then
+ ' SQL = "UPDATE List_Case set QTY=0, Price=0, eppc=0 where ID=" & CaseId
+ 'Else
+ ' SQL = "UPDATE List_Case set QTY=" & NQty & ", Price=" & NPrice & ", eppc=" & NPPI & " where ID=" & CaseId
+ 'End If
+ 'Obj.ConnExec(SQL)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnViewCalc control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnViewCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnViewCalc.Click
+ 'txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)),
+ ' CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)))
+ Try
+ If CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)) > 0 Then
+ txtUPPI.Text = Converters.ConvertToDollars(
+ CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)) /
+ CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)))
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "btnViewCalc_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Try
+ Call SaveData()
+ If FromView Then Call FrmViewListShells.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnUpdate.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtyShellcase control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtyShellcase_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyShot.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyShot.Designer.vb
index 58c4e7d..d0c43d0 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyShot.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyShot.Designer.vb
@@ -1,194 +1,196 @@
- _
-Partial Class frmAddQtyShot
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyShot
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyShot))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(131, 160)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 17
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(16, 160)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 16
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(3, 81)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 73)
- Me.GroupBox2.TabIndex = 15
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(66, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Weight (lbs):"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(3, 3)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 72)
- Me.GroupBox1.TabIndex = 14
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(66, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Weight (lbs):"
- '
- 'frmAddQtyShot
- '
- Me.AcceptButton = Me.btnUpdate
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(223, 192)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyShot"
- Me.Text = "Update Shot Qty."
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyShot))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(131, 160)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 17
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(16, 160)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 16
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(3, 81)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 73)
+ Me.GroupBox2.TabIndex = 15
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(66, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Weight (lbs):"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(3, 3)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 72)
+ Me.GroupBox1.TabIndex = 14
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(66, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Weight (lbs):"
+ '
+ 'frmAddQtyShot
+ '
+ Me.AcceptButton = Me.btnUpdate
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(223, 192)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyShot"
+ Me.Text = "Update Shot Qty."
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyShot.vb b/BSMyLoadersLog/Adding/frmAddQtyShot.vb
index 70b93d1..ac4d315 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyShot.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyShot.vb
@@ -1,77 +1,134 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
+'Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtyShot
- Public BID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from List_SG_ShotType_Details where ID=" & BID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim TimesUsed As Long = 0
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("weight")) Then iQty = RS("weight")
- txtCQty.Text = iQty
- If iQty = 0 Then dPrice = 0
- Dim ObjIM As New InventoryMath
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyShot_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
+Namespace Adding
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Sub SaveData()
- Try
- '93.8 pellets per oz
- 'BPI Nickel Plated Lead Shot #2 11 lb Box
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
- Dim UQty As Long = CDbl(GeneralHelpers.FluffContent(txtUQty.Text, 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = CPrice + UPrice
- Dim ounces As Double = WeightOz1Lbs * NQty
- SQL = "Update List_SG_ShotType_Details set Price=" & NPrice & ", weight='" & NQty & _
- "',ounces=" & ounces & " where ID=" & BID
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Call SaveData()
- If FromView Then Call frmView_List_Shot.LoadData()
- Me.Close()
- End Sub
-End Class
\ No newline at end of file
+ '''
+ ''' Class frmAddQtyShot.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddQtyShot
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The shot identifier
+ '''
+ Public ShotId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' The current price per item
+ '''
+ Dim _currentPricePerItem as Double
+ 'Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ ' Dim dAns As Double = 0
+ ' Dim ObjIM As New InventoryMath
+ ' If lQty > 0 Then
+ ' dAns = dPrice / lQty
+ ' End If
+ ' Converters.ConvertToDollars(dAns)
+ ' Return dAns
+ 'End Function
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ Dim lst as List(Of ShotgunShotTypeData) = ShotgunShotTypeInventory.GetDetails(DatabasePath, ShotId, _errOut)
+ if _errOut.Length > 0 then Throw new Exception(_errOut)
+ For Each o As ShotgunShotTypeData In lst
+ txtCQty.Text = o.Qty
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ _currentPricePerItem = o.EstimatedPricePerItem
+ Next
+ 'Dim Obj As New BSDatabase
+ 'Call Obj.ConnectDB()
+ 'Dim SQL As String = "SELECT * from List_SG_ShotType_Details where ID=" & ShotId
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim TimesUsed As Long = 0
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("weight")) Then iQty = RS("weight")
+ ' txtCQty.Text = iQty
+ ' If iQty = 0 Then dPrice = 0
+ ' Dim ObjIM As New InventoryMath
+ ' txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Call Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtyShot control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtyShot_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ '93.8 pellets per oz
+ 'BPI Nickel Plated Lead Shot #2 11 lb Box
+ Dim currentQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
+ Dim currentPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
+ Dim newQty As Long = CDbl(GeneralHelpers.FluffContent(txtUQty.Text, 0))
+ Dim newPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
+ 'Dim currentPricePerItem as Double = 0
+ If Not ShotgunShotTypeInventory.UpdateQty(DatabasePath, ShotId, currentQty, currentPrice,
+ _currentPricePerItem, newQty, newPrice, _errOut) Then throw new exception(_errOut)
+ 'Dim sql As String = ""
+ 'Dim obj As New BSDatabase
+ 'Dim nQty As Long = currentQty + newQty
+ 'Dim nPrice As Double = currentPrice + newPrice
+ 'Dim ounces As Double = WeightValues.WEIGHT_OZ_1LBS * nQty
+ 'sql = "Update List_SG_ShotType_Details set Price=" & nPrice & ", weight='" & nQty & _
+ ' "',ounces=" & ounces & " where ID=" & ShotId
+ 'obj.ConnExec(sql)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Call SaveData()
+ If FromView Then Call FrmViewListShot.LoadData()
+ Close()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtySlug.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtySlug.Designer.vb
index 72f5d05..5f90471 100644
--- a/BSMyLoadersLog/Adding/frmAddQtySlug.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtySlug.Designer.vb
@@ -1,256 +1,258 @@
- _
-Partial Class frmAddQtySlug
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtySlug
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtySlug))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnViewCalc = New System.Windows.Forms.Button
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.txtUPPI = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.txtCPPI = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(154, 226)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 9
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(12, 226)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 8
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(12, 100)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 7
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(12, 3)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 6
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'frmAddQtySlug
- '
- Me.AcceptButton = Me.btnUpdate
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(244, 258)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtySlug"
- Me.Text = "Update Slug Qty."
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtySlug))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.btnViewCalc = New System.Windows.Forms.Button
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.txtUPPI = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.txtCPPI = New System.Windows.Forms.TextBox
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(154, 226)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 9
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(12, 226)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 8
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(12, 100)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 7
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(12, 3)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 6
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'frmAddQtySlug
+ '
+ Me.AcceptButton = Me.btnUpdate
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(244, 258)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtySlug"
+ Me.Text = "Update Slug Qty."
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtySlug.vb b/BSMyLoadersLog/Adding/frmAddQtySlug.vb
index 3f899eb..9d8be30 100644
--- a/BSMyLoadersLog/Adding/frmAddQtySlug.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtySlug.vb
@@ -1,91 +1,151 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data.Odbc
+Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtySlug
- Public SID As Long
- Public FromView As Boolean
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Public Sub LoadData()
- Try
- Dim SQL As String = "SELECT * from List_SG_ShotType_Details where ID=" & SID
- Dim Obj As New BSDatabase
- Dim ObjIM As New InventoryMath
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("epps")) Then eppo = RS("epps")
- txtCQty.Text = iQty
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- txtCPPI.Text = ObjIM.ConvertToDollars(eppo)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Public Sub SaveData()
- Try
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
- Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
- Dim UQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE List_SG_ShotType_Details set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & SID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE List_SG_ShotType_Details set QTY=0, Price=0, epps=0 where ID=" & SID
- Else
- SQL = "UPDATE List_SG_ShotType_Details set QTY=" & NQty & ", Price=" & NPrice & ", epps=" & NPPI & " where ID=" & SID
- End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtySlug_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
-
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+ '''
+ ''' Class frmAddQtySlug.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddQtySlug
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The slug identifier
+ '''
+ Public SlugId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Call SaveData()
- If FromView Then Call frmView_List_Slug.LoadData()
- Me.Close()
- End Sub
+ 'Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ ' Dim dAns As Double = 0
+ ' Dim ObjIM As New InventoryMath
+ ' If lQty > 0 Then
+ ' dAns = dPrice / lQty
+ ' End If
+ ' Converters.ConvertToDollars(dAns)
+ ' Return dAns
+ 'End Function
+ '''
+ ''' Loads the data.
+ '''
+ '''
+ Public Sub LoadData()
+ Try
+ Dim lst as List(Of ShotgunShotTypeData) = ShotgunShotTypeInventory.GetDetails(DatabasePath, SlugId, _errOut)
+ if _errOut.Length > 0 then Throw new Exception(_errOut)
+ For Each o As ShotgunShotTypeData In lst
+ txtCQty.Text = o.Qty
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ txtCPPI.Text = Converters.ConvertToDollars(o.EstimatedPricePerItem)
+ Next
+ 'Dim SQL As String = "SELECT * from List_SG_ShotType_Details where ID=" & SlugId
+ 'Dim Obj As New BSDatabase
+ 'Dim ObjIM As New InventoryMath
+ 'Call Obj.ConnectDB()
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("epps")) Then eppo = RS("epps")
+ ' txtCQty.Text = iQty
+ ' txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ ' txtCPPI.Text = Converters.ConvertToDollars(eppo)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Public Sub SaveData()
+ Try
+ Dim currentQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
+ Dim currentPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
+ Dim currentPricePerItem As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
+ Dim newQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
+ Dim newPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
+ 'Dim newPricePerItem As Double = PricePerItem(newQty, newPrice)
+ 'txtUPPI.Text = newPricePerItem
+ If Not GeneralHelpers.IsRequired(newQty, "Update Qty", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(newPrice, "Update Price", Text) Then Exit Sub
+ ' TODO: #19 Remove comment below on net Library Update
+ 'If Not ShotgunShotTypeInventory.UpdateQtySlug(DatabasePath, SlugId, currentQty, currentPrice,
+ ' currentPricePerItem, newQty, newPrice,
+ ' _errOut) Then Throw new Exception(_errOut)
- Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(txtUQty.Text), CDbl(txtUPrice.Text))
- End Sub
-End Class
\ No newline at end of file
+ 'Dim NQty As Long = currentQty + newQty
+ 'Dim NPrice As Double = (currentQty * currentPricePerItem) + newPrice
+ 'Dim NPPI As Double = PricePerItem(NQty, NPrice)
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ 'If currentPricePerItem = newPricePerItem Then
+ ' SQL = "UPDATE List_SG_ShotType_Details set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & SlugId
+ 'ElseIf newPrice = 0 And newQty = 0 Then
+ ' SQL = "UPDATE List_SG_ShotType_Details set QTY=0, Price=0, epps=0 where ID=" & SlugId
+ 'Else
+ ' SQL = "UPDATE List_SG_ShotType_Details set QTY=" & NQty & ", Price=" & NPrice & ", epps=" & NPPI & " where ID=" & SlugId
+ 'End If
+ 'Obj.ConnExec(SQL)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtySlug control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtySlug_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Call SaveData()
+ If FromView Then Call FrmViewListSlug.LoadData()
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnViewCalc control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnViewCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnViewCalc.Click
+ If CLng(txtUQty.Text) > 0 Then
+ txtUPPI.Text = Converters.ConvertToDollars(CDbl(txtUPrice.Text) / CLng(txtUQty.Text))
+ End If
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyWAD.Designer.vb b/BSMyLoadersLog/Adding/frmAddQtyWAD.Designer.vb
index 8c78693..5525069 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyWAD.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyWAD.Designer.vb
@@ -1,254 +1,256 @@
- _
-Partial Class frmAddQtyWAD
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddQtyWad
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyWAD))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnViewCalc = New System.Windows.Forms.Button
- Me.txtUPrice = New System.Windows.Forms.TextBox
- Me.txtUQty = New System.Windows.Forms.TextBox
- Me.txtUPPI = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtCPrice = New System.Windows.Forms.TextBox
- Me.txtCQty = New System.Windows.Forms.TextBox
- Me.txtCPPI = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(131, 226)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 17
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(14, 226)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 16
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnViewCalc)
- Me.GroupBox2.Controls.Add(Me.txtUPrice)
- Me.GroupBox2.Controls.Add(Me.txtUQty)
- Me.GroupBox2.Controls.Add(Me.txtUPPI)
- Me.GroupBox2.Controls.Add(Me.Label4)
- Me.GroupBox2.Controls.Add(Me.Label5)
- Me.GroupBox2.Controls.Add(Me.Label6)
- Me.GroupBox2.Location = New System.Drawing.Point(3, 100)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
- Me.GroupBox2.TabIndex = 15
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Update Status"
- '
- 'btnViewCalc
- '
- Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
- Me.btnViewCalc.Name = "btnViewCalc"
- Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
- Me.btnViewCalc.TabIndex = 3
- Me.btnViewCalc.Text = "View Calculation"
- Me.btnViewCalc.UseVisualStyleBackColor = True
- '
- 'txtUPrice
- '
- Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
- Me.txtUPrice.Name = "txtUPrice"
- Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtUPrice.TabIndex = 2
- Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUQty
- '
- Me.txtUQty.Location = New System.Drawing.Point(96, 18)
- Me.txtUQty.Name = "txtUQty"
- Me.txtUQty.Size = New System.Drawing.Size(107, 20)
- Me.txtUQty.TabIndex = 1
- Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtUPPI
- '
- Me.txtUPPI.Enabled = False
- Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
- Me.txtUPPI.Name = "txtUPPI"
- Me.txtUPPI.ReadOnly = True
- Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtUPPI.TabIndex = 9
- Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(14, 65)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(76, 13)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "Price Per Item:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(15, 43)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 7
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(15, 21)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 6
- Me.Label6.Text = "Qty:"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCPrice)
- Me.GroupBox1.Controls.Add(Me.txtCQty)
- Me.GroupBox1.Controls.Add(Me.txtCPPI)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Location = New System.Drawing.Point(3, 3)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
- Me.GroupBox1.TabIndex = 14
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Current Status"
- '
- 'txtCPrice
- '
- Me.txtCPrice.Enabled = False
- Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
- Me.txtCPrice.Name = "txtCPrice"
- Me.txtCPrice.ReadOnly = True
- Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
- Me.txtCPrice.TabIndex = 5
- Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCQty
- '
- Me.txtCQty.Enabled = False
- Me.txtCQty.Location = New System.Drawing.Point(91, 17)
- Me.txtCQty.Name = "txtCQty"
- Me.txtCQty.ReadOnly = True
- Me.txtCQty.Size = New System.Drawing.Size(107, 20)
- Me.txtCQty.TabIndex = 4
- Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'txtCPPI
- '
- Me.txtCPPI.Enabled = False
- Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
- Me.txtCPPI.Name = "txtCPPI"
- Me.txtCPPI.ReadOnly = True
- Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
- Me.txtCPPI.TabIndex = 3
- Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(9, 64)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(76, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Price Per Item:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(10, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Price:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(10, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(26, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Qty:"
- '
- 'frmAddQtyWAD
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(227, 257)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddQtyWAD"
- Me.Text = "Update WAD Qty."
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox2.PerformLayout()
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox1.PerformLayout()
- Me.ResumeLayout(False)
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddQtyWAD))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox
+ Me.btnViewCalc = New System.Windows.Forms.Button
+ Me.txtUPrice = New System.Windows.Forms.TextBox
+ Me.txtUQty = New System.Windows.Forms.TextBox
+ Me.txtUPPI = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox
+ Me.txtCPrice = New System.Windows.Forms.TextBox
+ Me.txtCQty = New System.Windows.Forms.TextBox
+ Me.txtCPPI = New System.Windows.Forms.TextBox
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.GroupBox2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(131, 226)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 17
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(14, 226)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 16
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnViewCalc)
+ Me.GroupBox2.Controls.Add(Me.txtUPrice)
+ Me.GroupBox2.Controls.Add(Me.txtUQty)
+ Me.GroupBox2.Controls.Add(Me.txtUPPI)
+ Me.GroupBox2.Controls.Add(Me.Label4)
+ Me.GroupBox2.Controls.Add(Me.Label5)
+ Me.GroupBox2.Controls.Add(Me.Label6)
+ Me.GroupBox2.Location = New System.Drawing.Point(3, 100)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(217, 120)
+ Me.GroupBox2.TabIndex = 15
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "Update Status"
+ '
+ 'btnViewCalc
+ '
+ Me.btnViewCalc.Location = New System.Drawing.Point(53, 88)
+ Me.btnViewCalc.Name = "btnViewCalc"
+ Me.btnViewCalc.Size = New System.Drawing.Size(110, 26)
+ Me.btnViewCalc.TabIndex = 3
+ Me.btnViewCalc.Text = "View Calculation"
+ Me.btnViewCalc.UseVisualStyleBackColor = True
+ '
+ 'txtUPrice
+ '
+ Me.txtUPrice.Location = New System.Drawing.Point(96, 40)
+ Me.txtUPrice.Name = "txtUPrice"
+ Me.txtUPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPrice.TabIndex = 2
+ Me.txtUPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUQty
+ '
+ Me.txtUQty.Location = New System.Drawing.Point(96, 18)
+ Me.txtUQty.Name = "txtUQty"
+ Me.txtUQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtUQty.TabIndex = 1
+ Me.txtUQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtUPPI
+ '
+ Me.txtUPPI.Enabled = False
+ Me.txtUPPI.Location = New System.Drawing.Point(96, 62)
+ Me.txtUPPI.Name = "txtUPPI"
+ Me.txtUPPI.ReadOnly = True
+ Me.txtUPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtUPPI.TabIndex = 9
+ Me.txtUPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(14, 65)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(76, 13)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "Price Per Item:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(15, 43)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 7
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(15, 21)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 6
+ Me.Label6.Text = "Qty:"
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.txtCPrice)
+ Me.GroupBox1.Controls.Add(Me.txtCQty)
+ Me.GroupBox1.Controls.Add(Me.txtCPPI)
+ Me.GroupBox1.Controls.Add(Me.Label3)
+ Me.GroupBox1.Controls.Add(Me.Label2)
+ Me.GroupBox1.Controls.Add(Me.Label1)
+ Me.GroupBox1.Location = New System.Drawing.Point(3, 3)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(217, 91)
+ Me.GroupBox1.TabIndex = 14
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Current Status"
+ '
+ 'txtCPrice
+ '
+ Me.txtCPrice.Enabled = False
+ Me.txtCPrice.Location = New System.Drawing.Point(91, 39)
+ Me.txtCPrice.Name = "txtCPrice"
+ Me.txtCPrice.ReadOnly = True
+ Me.txtCPrice.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPrice.TabIndex = 5
+ Me.txtCPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCQty
+ '
+ Me.txtCQty.Enabled = False
+ Me.txtCQty.Location = New System.Drawing.Point(91, 17)
+ Me.txtCQty.Name = "txtCQty"
+ Me.txtCQty.ReadOnly = True
+ Me.txtCQty.Size = New System.Drawing.Size(107, 20)
+ Me.txtCQty.TabIndex = 4
+ Me.txtCQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'txtCPPI
+ '
+ Me.txtCPPI.Enabled = False
+ Me.txtCPPI.Location = New System.Drawing.Point(91, 61)
+ Me.txtCPPI.Name = "txtCPPI"
+ Me.txtCPPI.ReadOnly = True
+ Me.txtCPPI.Size = New System.Drawing.Size(107, 20)
+ Me.txtCPPI.TabIndex = 3
+ Me.txtCPPI.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(9, 64)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(76, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Price Per Item:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(10, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Price:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(10, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(26, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Qty:"
+ '
+ 'frmAddQtyWAD
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(227, 257)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.GroupBox2)
+ Me.Controls.Add(Me.GroupBox1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddQtyWAD"
+ Me.Text = "Update WAD Qty."
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
+ Me.GroupBox1.ResumeLayout(False)
+ Me.GroupBox1.PerformLayout()
+ Me.ResumeLayout(False)
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnViewCalc As System.Windows.Forms.Button
- Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtUQty As System.Windows.Forms.TextBox
- Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCQty As System.Windows.Forms.TextBox
- Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+ Friend WithEvents btnViewCalc As System.Windows.Forms.Button
+ Friend WithEvents txtUPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtUQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtUPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+ Friend WithEvents txtCPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtCQty As System.Windows.Forms.TextBox
+ Friend WithEvents txtCPPI As System.Windows.Forms.TextBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddQtyWAD.vb b/BSMyLoadersLog/Adding/frmAddQtyWAD.vb
index 8ead01d..05966d6 100644
--- a/BSMyLoadersLog/Adding/frmAddQtyWAD.vb
+++ b/BSMyLoadersLog/Adding/frmAddQtyWAD.vb
@@ -1,92 +1,153 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data.Odbc
+Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmAddQtyWAD
- Public FromView As Boolean
- Public WID As Long
- Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
- Dim dAns As Double = 0
- Dim ObjIM As New InventoryMath
- If lQty > 0 Then
- dAns = dPrice / lQty
- End If
- ObjIM.ConvertToDollars(dAns)
- Return dAns
- End Function
- Sub LoadData()
- Try
- Dim SQL As String = "SELECT * from List_SG_WAD where ID=" & WID
- Dim Obj As New BSDatabase
- Dim ObjIM As New InventoryMath
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("eppw")) Then eppo = RS("eppw")
- txtCQty.Text = iQty
- txtCPrice.Text = ObjIM.ConvertToDollars(dPrice)
- txtCPPI.Text = ObjIM.ConvertToDollars(eppo)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim CQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
- Dim CPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
- Dim CPPI As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
- Dim UQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
- Dim UPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
- Dim UPPI As Double = PricePerItem(UQty, UPrice)
- txtUPPI.Text = UPPI
- If Not GeneralHelpers.IsRequired(UQty, "Update Qty", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(UPrice, "Update Price", Me.Text) Then Exit Sub
+Namespace Adding
- Dim NQty As Long = CQty + UQty
- Dim NPrice As Double = (CQty * CPPI) + UPrice
- Dim NPPI As Double = PricePerItem(NQty, NPrice)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If CPPI = UPPI Then
- SQL = "UPDATE List_SG_WAD set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & WID
- ElseIf UPrice = 0 And UQty = 0 Then
- SQL = "UPDATE List_SG_WAD set QTY=0, Price=0, eppw=0 where ID=" & WID
- Else
- SQL = "UPDATE List_SG_WAD set QTY=" & NQty & ", Price=" & NPrice & ", eppw=" & NPPI & " where ID=" & WID
- End If
- Obj.ConnExec(SQL)
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddQtyWAD_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call LoadData()
- End Sub
+ Public Class FrmAddQtyWad
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' The wad identifier
+ '''
+ Public WadId As Long
+ 'Function PricePerItem(ByVal lQty As Long, ByVal dPrice As Double) As Double
+ ' Dim dAns As Double = 0
+ ' Dim ObjIM As New InventoryMath
+ ' If lQty > 0 Then
+ ' dAns = dPrice / lQty
+ ' End If
+ ' Converters.ConvertToDollars(dAns)
+ ' Return dAns
+ 'End Function
+ '''
+ ''' Loads the data.
+ '''
+ '''
+ Sub LoadData()
+ Try
+ Dim lst As List(Of WadData) = WadInventory.GetDetails(DatabasePath, WadId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As WadData In lst
+ txtCQty.Text = o.Qty
+ txtCPrice.Text = Converters.ConvertToDollars(o.Price)
+ txtCPPI.Text = Converters.ConvertToDollars(o.EstimatedPricePerItem)
+ Next
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+ 'Dim SQL As String = "SELECT * from List_SG_WAD where ID=" & WadId
+ 'Dim Obj As New BSDatabase
+ 'Dim ObjIM As New InventoryMath
+ 'Call Obj.ConnectDB()
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("eppw")) Then eppo = RS("eppw")
+ ' txtCQty.Text = iQty
+ ' txtCPrice.Text = Converters.ConvertToDollars(dPrice)
+ ' txtCPPI.Text = Converters.ConvertToDollars(eppo)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim currentQty As Long = CLng(GeneralHelpers.FluffContent(txtCQty.Text, 0))
+ Dim currentPrice As Double = CDbl(GeneralHelpers.FluffContent(txtCPrice.Text, 0))
+ Dim currentPricePerItem As Double = CDbl(GeneralHelpers.FluffContent(txtCPPI.Text, 0))
+ Dim newQty As Long = CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0))
+ Dim newPrice As Double = CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0))
+ 'Dim newPricePerItem As Double = PricePerItem(newQty, newPrice)
+ 'txtUPPI.Text = newPricePerItem
+ If Not GeneralHelpers.IsRequired(newQty, "Update Qty", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(newPrice, "Update Price", Text) Then Exit Sub
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Call SaveData()
- If FromView Then Call frmView_List_WADS.LoadData()
- Me.Close()
- End Sub
+ If Not WadInventory.UpdateQty(DatabasePath, WadId, currentQty, currentPrice, currentPricePerItem,
+ newQty, newPrice, _errOut) Then Throw New Exception(_errOut)
- Private Sub btnViewCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewCalc.Click
- txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)),
- CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)))
- End Sub
-End Class
\ No newline at end of file
+ 'Dim NQty As Long = currentQty + newQty
+ 'Dim NPrice As Double = (currentQty * currentPricePerItem) + newPrice
+ 'Dim NPPI As Double = PricePerItem(NQty, NPrice)
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ 'If currentPricePerItem = newPricePerItem Then
+ ' SQL = "UPDATE List_SG_WAD set QTY=" & NQty & ", Price=" & NPrice & " where ID=" & WadId
+ 'ElseIf newPrice = 0 And newQty = 0 Then
+ ' SQL = "UPDATE List_SG_WAD set QTY=0, Price=0, eppw=0 where ID=" & WadId
+ 'Else
+ ' SQL = "UPDATE List_SG_WAD set QTY=" & NQty & ", Price=" & NPrice & ", eppw=" & NPPI & " where ID=" & WadId
+ 'End If
+ 'Obj.ConnExec(SQL)
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddQtyWAD control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddQtyWAD_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Call SaveData()
+ If FromView Then Call FrmViewListWads.LoadData()
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnViewCalc control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnViewCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnViewCalc.Click
+ 'txtUPPI.Text = PricePerItem(CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)),
+ ' CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)))
+ Try
+ If CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)) > 0 Then
+ txtUPPI.Text = Converters.ConvertToDollars(
+ CDbl(GeneralHelpers.FluffContent(txtUPrice.Text, 0)) /
+ CLng(GeneralHelpers.FluffContent(txtUQty.Text, 0)))
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "btnViewCalc_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShell.Designer.vb b/BSMyLoadersLog/Adding/frmAddShell.Designer.vb
index 4090f5b..05c8f5d 100644
--- a/BSMyLoadersLog/Adding/frmAddShell.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddShell.Designer.vb
@@ -1,275 +1,277 @@
- _
-Partial Class frmAddShell
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddShell
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShell))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtLen = New System.Windows.Forms.TextBox
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.cmbGauge = New System.Windows.Forms.ComboBox
- Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtDRAM = New System.Windows.Forms.TextBox
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(13, 13)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(13, 42)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(13, 68)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Gauge:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(13, 95)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(43, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Length:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(13, 146)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(26, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Qty."
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(13, 173)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(34, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Price:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(105, 13)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(167, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(105, 39)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(167, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtLen
- '
- Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtLen.Location = New System.Drawing.Point(105, 92)
- Me.txtLen.Name = "txtLen"
- Me.txtLen.Size = New System.Drawing.Size(167, 20)
- Me.txtLen.TabIndex = 4
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(105, 170)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(167, 20)
- Me.txtPrice.TabIndex = 7
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(105, 144)
- Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(167, 20)
- Me.nudQty.TabIndex = 6
- '
- 'cmbGauge
- '
- Me.cmbGauge.DataSource = Me.ListSGGaugeBindingSource
- Me.cmbGauge.DisplayMember = "ga"
- Me.cmbGauge.FormattingEnabled = True
- Me.cmbGauge.Location = New System.Drawing.Point(105, 65)
- Me.cmbGauge.Name = "cmbGauge"
- Me.cmbGauge.Size = New System.Drawing.Size(167, 21)
- Me.cmbGauge.TabIndex = 3
- Me.cmbGauge.ValueMember = "ID"
- '
- 'ListSGGaugeBindingSource
- '
- Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
- Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'List_SG_GaugeTableAdapter
- '
- Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(30, 206)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 8
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(168, 206)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 9
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(13, 119)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(42, 13)
- Me.Label7.TabIndex = 9
- Me.Label7.Text = "DRAM:"
- '
- 'txtDRAM
- '
- Me.txtDRAM.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtDRAM.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtDRAM.Location = New System.Drawing.Point(105, 119)
- Me.txtDRAM.Name = "txtDRAM"
- Me.txtDRAM.Size = New System.Drawing.Size(167, 20)
- Me.txtDRAM.TabIndex = 5
- '
- 'frmAddShell
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(287, 259)
- Me.Controls.Add(Me.txtDRAM)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.cmbGauge)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtLen)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add Shell Hulls to Inventory")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add Shell Hulls to Inventory")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddShell"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Shotshell Hulls"
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShell))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtLen = New System.Windows.Forms.TextBox
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.cmbGauge = New System.Windows.Forms.ComboBox
+ Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.txtDRAM = New System.Windows.Forms.TextBox
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(13, 13)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(13, 42)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(13, 68)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Gauge:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(13, 95)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(43, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Length:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(13, 146)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(26, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Qty."
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(13, 173)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(34, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Price:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(105, 13)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(167, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(105, 39)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(167, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtLen
+ '
+ Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLen.Location = New System.Drawing.Point(105, 92)
+ Me.txtLen.Name = "txtLen"
+ Me.txtLen.Size = New System.Drawing.Size(167, 20)
+ Me.txtLen.TabIndex = 4
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(105, 170)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(167, 20)
+ Me.txtPrice.TabIndex = 7
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(105, 144)
+ Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(167, 20)
+ Me.nudQty.TabIndex = 6
+ '
+ 'cmbGauge
+ '
+ Me.cmbGauge.DataSource = Me.ListSGGaugeBindingSource
+ Me.cmbGauge.DisplayMember = "ga"
+ Me.cmbGauge.FormattingEnabled = True
+ Me.cmbGauge.Location = New System.Drawing.Point(105, 65)
+ Me.cmbGauge.Name = "cmbGauge"
+ Me.cmbGauge.Size = New System.Drawing.Size(167, 21)
+ Me.cmbGauge.TabIndex = 3
+ Me.cmbGauge.ValueMember = "ID"
+ '
+ 'ListSGGaugeBindingSource
+ '
+ Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
+ Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'List_SG_GaugeTableAdapter
+ '
+ Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(30, 206)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 8
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(168, 206)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 9
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(13, 119)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(42, 13)
+ Me.Label7.TabIndex = 9
+ Me.Label7.Text = "DRAM:"
+ '
+ 'txtDRAM
+ '
+ Me.txtDRAM.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtDRAM.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtDRAM.Location = New System.Drawing.Point(105, 119)
+ Me.txtDRAM.Name = "txtDRAM"
+ Me.txtDRAM.Size = New System.Drawing.Size(167, 20)
+ Me.txtDRAM.TabIndex = 5
+ '
+ 'frmAddShell
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(287, 259)
+ Me.Controls.Add(Me.txtDRAM)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.cmbGauge)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtLen)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add Shell Hulls to Inventory")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add Shell Hulls to Inventory")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddShell"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Shotshell Hulls"
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtLen As System.Windows.Forms.TextBox
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents cmbGauge As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents txtDRAM As System.Windows.Forms.TextBox
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtLen As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents cmbGauge As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents txtDRAM As System.Windows.Forms.TextBox
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShell.vb b/BSMyLoadersLog/Adding/frmAddShell.vb
index e37af6b..b2372f8 100644
--- a/BSMyLoadersLog/Adding/frmAddShell.vb
+++ b/BSMyLoadersLog/Adding/frmAddShell.vb
@@ -1,72 +1,122 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddShell
- Sub AutoLoad()
- Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Case_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAF.List_SG_Case_Name
- txtLen.AutoCompleteCustomSource = ObjAF.List_SG_Case_Length
- txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_Case_Price
- txtDRAM.AutoCompleteCustomSource = ObjAF.List_SG_Case_DRAM
- Catch ex As Exception
- Call LogError(Me.Name, "utoLoad", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim GID As Long = cmbGauge.SelectedValue
- Dim strGAName As String = cmbGauge.Text
- Dim strLen As String = GeneralHelpers.FluffContent(txtLen.Text)
- Dim sDRAM As String = GeneralHelpers.FluffContent(txtDRAM.Text)
- Dim iQty As Long = nudQty.Value
- Dim epps As Double = 0
- Dim dPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
+Namespace Adding
+ '''
+ ''' Class FrmAddShell.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddShell
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' Automatics the load.
+ '''
+ '''
+ Sub AutoLoad()
+ Try
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Case_Manufacturer
+ 'txtName.AutoCompleteCustomSource = ObjAF.List_SG_Case_Name
+ 'txtLen.AutoCompleteCustomSource = ObjAF.List_SG_Case_Length
+ 'txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_Case_Price
+ 'txtDRAM.AutoCompleteCustomSource = ObjAF.List_SG_Case_DRAM
+ txtManu.AutoCompleteCustomSource = GeneralShotgun.CaseManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = GeneralShotgun.CaseName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtLen.AutoCompleteCustomSource = GeneralShotgun.Length(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = GeneralShotgun.Price(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtDRAM.AutoCompleteCustomSource = GeneralShotgun.Dram(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "utoLoad", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim manufacturer As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim itemName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim gaugeId As Long = cmbGauge.SelectedValue
+ Dim gaugeName As String = cmbGauge.Text
+ Dim length As String = GeneralHelpers.FluffContent(txtLen.Text)
+ Dim dram As String = GeneralHelpers.FluffContent(txtDRAM.Text)
+ Dim qty As Long = nudQty.Value
+ 'Dim esitematedPricePerItem As Double = 0
+ Dim price As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strLen, "Length", Me.Text) Then Exit Sub
- If dPrice <> 0 Then
- epps = (dPrice / iQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO List_SG_Case (Manufacturer,Name,Gauge," & _
- "GID,Length,Qty,Price,epps,DRAM) VALUES('" & _
- strManu & "','" & strName & "','" & strGAName & _
- "'," & GID & ",'" & strLen & "'," & iQty & _
- "," & dPrice & "," & epps & ",'" & sDRAM & "')"
- Obj.ConnExec(SQL)
- Dim sAns As String = MsgBox(strManu & " " & strName & " was added to the database." & Chr(10) & "Do you wish to add another?", MsgBoxStyle.YesNo, Me.Text)
- If sAns = vbYes Then
- txtManu.Text = ""
- txtName.Text = ""
- txtLen.Text = ""
- nudQty.Value = 0
- txtPrice.Text = ""
- Else
- Me.Close()
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddShell_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.List_SG_GaugeTableAdapter.Fill(Me.MLLDataSet.List_SG_Gauge)
- Call AutoLoad()
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+ If Not GeneralHelpers.IsRequired(manufacturer, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(itemName, "Name", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(length, "Length", Text) Then Exit Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Call SaveData()
- End Sub
-End Class
\ No newline at end of file
+ If Not ShotgunHullInventory.Add(DatabasePath, manufacturer, itemName,
+ gaugeName, gaugeId, length, qty, price,
+ dram, _errOut) Then Throw New Exception(_errOut)
+ 'If price <> 0 Then
+ ' esitematedPricePerItem = (price / qty)
+ 'End If
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "INSERT INTO List_SG_Case (Manufacturer,Name,Gauge," & _
+ ' "GID,Length,Qty,Price,epps,DRAM) VALUES('" & _
+ ' manufacturer & "','" & itemName & "','" & gaugeName & _
+ ' "'," & gaugeId & ",'" & length & "'," & qty & _
+ ' "," & price & "," & esitematedPricePerItem & ",'" & dram & "')"
+ 'Obj.ConnExec(SQL)
+ Dim sAns As String = MsgBox($"{manufacturer} {itemName} was added to the database.
+{Environment.NewLine} Do you wish to add another?",
+ MsgBoxStyle.YesNo, Text)
+ If sAns = vbYes Then
+ txtManu.Text = ""
+ txtName.Text = ""
+ txtLen.Text = ""
+ nudQty.Value = 0
+ txtPrice.Text = ""
+ Else
+ Close()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddShell control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddShell_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ List_SG_GaugeTableAdapter.Fill(MLLDataSet.List_SG_Gauge)
+ Call AutoLoad()
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ End Class
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShells.Designer.vb b/BSMyLoadersLog/Adding/frmAddShells.Designer.vb
index f4b4846..ebf97a0 100644
--- a/BSMyLoadersLog/Adding/frmAddShells.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddShells.Designer.vb
@@ -1,303 +1,305 @@
- _
-Partial Class frmAddShells
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddShells
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShells))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtTTL = New System.Windows.Forms.TextBox
- Me.chkNew = New System.Windows.Forms.CheckBox
- Me.nudUsed = New System.Windows.Forms.NumericUpDown
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.Label8 = New System.Windows.Forms.Label
- Me.cmbCal = New System.Windows.Forms.ComboBox
- Me.ListCalibersBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.List_CalibersTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.nudUsed, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 9)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 37)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 89)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(78, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Trim to Length:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 114)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(90, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "New Shell/Case?"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 141)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(118, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Number of Times Used:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 164)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Qty:"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(12, 191)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(34, 13)
- Me.Label7.TabIndex = 6
- Me.Label7.Text = "Price:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(132, 8)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(198, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(132, 34)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(198, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtTTL
- '
- Me.txtTTL.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtTTL.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtTTL.Location = New System.Drawing.Point(132, 86)
- Me.txtTTL.Name = "txtTTL"
- Me.txtTTL.Size = New System.Drawing.Size(198, 20)
- Me.txtTTL.TabIndex = 4
- '
- 'chkNew
- '
- Me.chkNew.AutoSize = True
- Me.chkNew.Location = New System.Drawing.Point(132, 113)
- Me.chkNew.Name = "chkNew"
- Me.chkNew.Size = New System.Drawing.Size(44, 17)
- Me.chkNew.TabIndex = 5
- Me.chkNew.Text = "Yes"
- Me.chkNew.UseVisualStyleBackColor = True
- '
- 'nudUsed
- '
- Me.nudUsed.Location = New System.Drawing.Point(132, 136)
- Me.nudUsed.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
- Me.nudUsed.Name = "nudUsed"
- Me.nudUsed.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.nudUsed.Size = New System.Drawing.Size(198, 20)
- Me.nudUsed.TabIndex = 6
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(132, 162)
- Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.nudQty.Size = New System.Drawing.Size(198, 20)
- Me.nudQty.TabIndex = 7
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(132, 188)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(198, 20)
- Me.txtPrice.TabIndex = 8
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(44, 216)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 9
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(215, 216)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 10
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(12, 62)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(60, 13)
- Me.Label8.TabIndex = 10
- Me.Label8.Text = "For Caliber:"
- '
- 'cmbCal
- '
- Me.cmbCal.DataSource = Me.ListCalibersBindingSource
- Me.cmbCal.DisplayMember = "Cal"
- Me.cmbCal.FormattingEnabled = True
- Me.cmbCal.Location = New System.Drawing.Point(132, 59)
- Me.cmbCal.Name = "cmbCal"
- Me.cmbCal.Size = New System.Drawing.Size(198, 21)
- Me.cmbCal.TabIndex = 3
- Me.cmbCal.ValueMember = "ID"
- '
- 'ListCalibersBindingSource
- '
- Me.ListCalibersBindingSource.DataMember = "List_Calibers"
- Me.ListCalibersBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'List_CalibersTableAdapter
- '
- Me.List_CalibersTableAdapter.ClearBeforeFill = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmAddShells
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(339, 251)
- Me.Controls.Add(Me.cmbCal)
- Me.Controls.Add(Me.Label8)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.nudUsed)
- Me.Controls.Add(Me.chkNew)
- Me.Controls.Add(Me.txtTTL)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add Cases to Inventory")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add Cases to Inventory")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddShells"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add Shells/Cases to Inventory"
- CType(Me.nudUsed, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShells))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtTTL = New System.Windows.Forms.TextBox
+ Me.chkNew = New System.Windows.Forms.CheckBox
+ Me.nudUsed = New System.Windows.Forms.NumericUpDown
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.cmbCal = New System.Windows.Forms.ComboBox
+ Me.ListCalibersBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.List_CalibersTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.nudUsed, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 37)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 89)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(78, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Trim to Length:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 114)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(90, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "New Shell/Case?"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 141)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(118, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Number of Times Used:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 164)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Qty:"
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(12, 191)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(34, 13)
+ Me.Label7.TabIndex = 6
+ Me.Label7.Text = "Price:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(132, 8)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(198, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(132, 34)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(198, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtTTL
+ '
+ Me.txtTTL.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtTTL.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtTTL.Location = New System.Drawing.Point(132, 86)
+ Me.txtTTL.Name = "txtTTL"
+ Me.txtTTL.Size = New System.Drawing.Size(198, 20)
+ Me.txtTTL.TabIndex = 4
+ '
+ 'chkNew
+ '
+ Me.chkNew.AutoSize = True
+ Me.chkNew.Location = New System.Drawing.Point(132, 113)
+ Me.chkNew.Name = "chkNew"
+ Me.chkNew.Size = New System.Drawing.Size(44, 17)
+ Me.chkNew.TabIndex = 5
+ Me.chkNew.Text = "Yes"
+ Me.chkNew.UseVisualStyleBackColor = True
+ '
+ 'nudUsed
+ '
+ Me.nudUsed.Location = New System.Drawing.Point(132, 136)
+ Me.nudUsed.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
+ Me.nudUsed.Name = "nudUsed"
+ Me.nudUsed.RightToLeft = System.Windows.Forms.RightToLeft.No
+ Me.nudUsed.Size = New System.Drawing.Size(198, 20)
+ Me.nudUsed.TabIndex = 6
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(132, 162)
+ Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.RightToLeft = System.Windows.Forms.RightToLeft.No
+ Me.nudQty.Size = New System.Drawing.Size(198, 20)
+ Me.nudQty.TabIndex = 7
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(132, 188)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(198, 20)
+ Me.txtPrice.TabIndex = 8
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(44, 216)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 9
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(215, 216)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 10
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(12, 62)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(60, 13)
+ Me.Label8.TabIndex = 10
+ Me.Label8.Text = "For Caliber:"
+ '
+ 'cmbCal
+ '
+ Me.cmbCal.DataSource = Me.ListCalibersBindingSource
+ Me.cmbCal.DisplayMember = "Cal"
+ Me.cmbCal.FormattingEnabled = True
+ Me.cmbCal.Location = New System.Drawing.Point(132, 59)
+ Me.cmbCal.Name = "cmbCal"
+ Me.cmbCal.Size = New System.Drawing.Size(198, 21)
+ Me.cmbCal.TabIndex = 3
+ Me.cmbCal.ValueMember = "ID"
+ '
+ 'ListCalibersBindingSource
+ '
+ Me.ListCalibersBindingSource.DataMember = "List_Calibers"
+ Me.ListCalibersBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'List_CalibersTableAdapter
+ '
+ Me.List_CalibersTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmAddShells
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(339, 251)
+ Me.Controls.Add(Me.cmbCal)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.nudUsed)
+ Me.Controls.Add(Me.chkNew)
+ Me.Controls.Add(Me.txtTTL)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add Cases to Inventory")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add Cases to Inventory")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddShells"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add Shells/Cases to Inventory"
+ CType(Me.nudUsed, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtTTL As System.Windows.Forms.TextBox
- Friend WithEvents chkNew As System.Windows.Forms.CheckBox
- Friend WithEvents nudUsed As System.Windows.Forms.NumericUpDown
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents cmbCal As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListCalibersBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_CalibersTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtTTL As System.Windows.Forms.TextBox
+ Friend WithEvents chkNew As System.Windows.Forms.CheckBox
+ Friend WithEvents nudUsed As System.Windows.Forms.NumericUpDown
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents cmbCal As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListCalibersBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_CalibersTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShells.vb b/BSMyLoadersLog/Adding/frmAddShells.vb
index 3948ec5..6bf8844 100644
--- a/BSMyLoadersLog/Adding/frmAddShells.vb
+++ b/BSMyLoadersLog/Adding/frmAddShells.vb
@@ -1,60 +1,105 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddShells
- Public FromView As Boolean
- Sub AutoFill()
- Try
- Dim ObjAf As New AutoFillCollections
- txtManu.AutoCompleteCustomSource = ObjAf.List_Case_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAf.List_Case_Name
- txtTTL.AutoCompleteCustomSource = ObjAf.List_Case_Trim_to_length
- txtPrice.AutoCompleteCustomSource = ObjAf.List_Case_Price
- Catch ex As Exception
- 'Dim ObjFS As New BSFileSystem
- 'Dim sMessage As String = "frmAddShells.AutoFill" & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddShells_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Me.List_CalibersTableAdapter.Fill(Me.MLLDataSet.List_Calibers)
- Call AutoFill()
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim strTrim As Double = GeneralHelpers.FluffContent(CDbl(txtTTL.Text), 0)
- Dim intNew As Integer = 0
- Dim intUsed As Integer = nudUsed.Value
- Dim intQty As Integer = nudQty.Value
- Dim dbPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
- Dim LngCalID As Long = cmbCal.SelectedValue
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strTrim, "Trim to Lenght", Me.Text) Then Exit Sub
- If chkNew.Checked Then intNew = 1
- Dim EstCostPerItem As Double = 0
- If dbPrice <> 0 Then
- EstCostPerItem = (dbPrice / intQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO List_Case (Manufacturer,Name,ttl," & _
- "IsNew,Qty,Price,CID, ePPC,TimesUsed) VALUES('" & strManu & "','" & strName & "','" & strTrim & _
- "'," & intNew & "," & intQty & "," & dbPrice & "," & LngCalID & "," & EstCostPerItem & "," & intUsed & ")"
- Obj.ConnExec(SQL)
- If FromView Then Call FrmViewListShells.LoadData()
- Me.Close()
- Catch ex As Exception
- 'Dim ObjFS As New BSFileSystem
- 'Dim sMessage As String = "frmAddShells.btnAdd.Click" & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError(Name, "btnAdd_Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+Namespace Adding
+
+ '''
+ ''' Class frmAddShells.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddShells
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ Sub AutoFill()
+ Try
+ 'Dim ObjAf As New AutoFillCollections
+ 'txtManu.AutoCompleteCustomSource = ObjAf.List_Case_Manufacturer
+ 'txtName.AutoCompleteCustomSource = ObjAf.List_Case_Name
+ 'txtTTL.AutoCompleteCustomSource = ObjAf.List_Case_Trim_to_length
+ 'txtPrice.AutoCompleteCustomSource = ObjAf.List_Case_Price
+ txtManu.AutoCompleteCustomSource = Cases.Manufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = Cases.Name(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtTTL.AutoCompleteCustomSource = Cases.TrimToLength(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = Cases.Price(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ 'Dim ObjFS As New BSFileSystem
+ 'Dim sMessage As String = "frmAddShells.AutoFill" & "::" & Err.Number & "::" & ex.Message.ToString()
+ 'ObjFS.LogFile(MyLogFile, sMessage)
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddShells control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddShells_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ List_CalibersTableAdapter.Fill(MLLDataSet.List_Calibers)
+ Call AutoFill()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim manufacturer As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim itemName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim trimToLength As Double = GeneralHelpers.FluffContent(CDbl(txtTTL.Text), 0)
+ 'Dim intNew As Integer = 0
+ Dim used As Integer = nudUsed.Value
+ Dim qty As Integer = nudQty.Value
+ Dim price As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
+ Dim caliberId As Long = cmbCal.SelectedValue
+ If Not GeneralHelpers.IsRequired(manufacturer, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(itemName, "Name", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(trimToLength, "Trim to Lenght", Text) Then Exit Sub
+
+ If Not CaseInventory.Add(DatabasePath, manufacturer, itemName, trimToLength, chkNew.Checked, used,
+ qty, price, caliberId, _errOut) Then Throw new Exception(_errOut)
+
+ 'If chkNew.Checked Then intNew = 1
+ 'Dim EstCostPerItem As Double = 0
+ 'If price <> 0 Then
+ ' EstCostPerItem = (price / qty)
+ 'End If
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "INSERT INTO List_Case (Manufacturer,Name,ttl," & _
+ ' "IsNew,Qty,Price,CID, ePPC,TimesUsed) VALUES('" & manufacturer & "','" & itemName & "','" & trimToLength & _
+ ' "'," & intNew & "," & qty & "," & price & "," & caliberId & "," & EstCostPerItem & "," & used & ")"
+ 'Obj.ConnExec(SQL)
+ If FromView Then Call FrmViewListShells.LoadData()
+ Close()
+ Catch ex As Exception
+ 'Dim ObjFS As New BSFileSystem
+ 'Dim sMessage As String = "frmAddShells.btnAdd.Click" & "::" & Err.Number & "::" & ex.Message.ToString()
+ 'ObjFS.LogFile(MyLogFile, sMessage)
+ Call LogError(Name, "btnAdd_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShot.Designer.vb b/BSMyLoadersLog/Adding/frmAddShot.Designer.vb
index ed6eec7..beffffc 100644
--- a/BSMyLoadersLog/Adding/frmAddShot.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddShot.Designer.vb
@@ -1,226 +1,228 @@
- _
-Partial Class frmAddShot
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddShot
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShot))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtMat = New System.Windows.Forms.TextBox
- Me.txtPounds = New System.Windows.Forms.TextBox
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtShotNo = New System.Windows.Forms.TextBox
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(13, 62)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(13, 88)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(13, 114)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(47, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Material:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(13, 165)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(88, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Weight (pounds):"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(13, 191)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Price:"
- '
- 'Label6
- '
- Me.Label6.Location = New System.Drawing.Point(13, 1)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(293, 47)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "This form will allow you to add the pounds of shot that you wish to add to the in" & _
- "ventory. Currently based on a brand new bag of shot being added to the inventor" & _
- "y."
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(119, 59)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(165, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(119, 85)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(165, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtMat
- '
- Me.txtMat.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtMat.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtMat.Location = New System.Drawing.Point(119, 111)
- Me.txtMat.Name = "txtMat"
- Me.txtMat.Size = New System.Drawing.Size(165, 20)
- Me.txtMat.TabIndex = 3
- '
- 'txtPounds
- '
- Me.txtPounds.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPounds.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPounds.Location = New System.Drawing.Point(119, 162)
- Me.txtPounds.Name = "txtPounds"
- Me.txtPounds.Size = New System.Drawing.Size(165, 20)
- Me.txtPounds.TabIndex = 5
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(119, 188)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(165, 20)
- Me.txtPrice.TabIndex = 6
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(33, 223)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 7
- Me.btnAdd.Text = "&Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(187, 222)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 8
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(13, 139)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(72, 13)
- Me.Label7.TabIndex = 13
- Me.Label7.Text = "Shot Number:"
- '
- 'txtShotNo
- '
- Me.txtShotNo.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtShotNo.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtShotNo.Location = New System.Drawing.Point(119, 136)
- Me.txtShotNo.Name = "txtShotNo"
- Me.txtShotNo.Size = New System.Drawing.Size(165, 20)
- Me.txtShotNo.TabIndex = 4
- '
- 'frmAddShot
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(309, 262)
- Me.Controls.Add(Me.txtShotNo)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtPounds)
- Me.Controls.Add(Me.txtMat)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddShot"
- Me.Text = "Add Shot to Inventory"
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddShot))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtMat = New System.Windows.Forms.TextBox
+ Me.txtPounds = New System.Windows.Forms.TextBox
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.txtShotNo = New System.Windows.Forms.TextBox
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(13, 62)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(13, 88)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(13, 114)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(47, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Material:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(13, 165)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(88, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Weight (pounds):"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(13, 191)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Price:"
+ '
+ 'Label6
+ '
+ Me.Label6.Location = New System.Drawing.Point(13, 1)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(293, 47)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "This form will allow you to add the pounds of shot that you wish to add to the in" & _
+ "ventory. Currently based on a brand new bag of shot being added to the inventor" & _
+ "y."
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(119, 59)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(165, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(119, 85)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(165, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtMat
+ '
+ Me.txtMat.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtMat.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtMat.Location = New System.Drawing.Point(119, 111)
+ Me.txtMat.Name = "txtMat"
+ Me.txtMat.Size = New System.Drawing.Size(165, 20)
+ Me.txtMat.TabIndex = 3
+ '
+ 'txtPounds
+ '
+ Me.txtPounds.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPounds.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPounds.Location = New System.Drawing.Point(119, 162)
+ Me.txtPounds.Name = "txtPounds"
+ Me.txtPounds.Size = New System.Drawing.Size(165, 20)
+ Me.txtPounds.TabIndex = 5
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(119, 188)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(165, 20)
+ Me.txtPrice.TabIndex = 6
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(33, 223)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 7
+ Me.btnAdd.Text = "&Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(187, 222)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 8
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(13, 139)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(72, 13)
+ Me.Label7.TabIndex = 13
+ Me.Label7.Text = "Shot Number:"
+ '
+ 'txtShotNo
+ '
+ Me.txtShotNo.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtShotNo.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtShotNo.Location = New System.Drawing.Point(119, 136)
+ Me.txtShotNo.Name = "txtShotNo"
+ Me.txtShotNo.Size = New System.Drawing.Size(165, 20)
+ Me.txtShotNo.TabIndex = 4
+ '
+ 'frmAddShot
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(309, 262)
+ Me.Controls.Add(Me.txtShotNo)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtPounds)
+ Me.Controls.Add(Me.txtMat)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddShot"
+ Me.Text = "Add Shot to Inventory"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtMat As System.Windows.Forms.TextBox
- Friend WithEvents txtPounds As System.Windows.Forms.TextBox
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents txtShotNo As System.Windows.Forms.TextBox
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtMat As System.Windows.Forms.TextBox
+ Friend WithEvents txtPounds As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents txtShotNo As System.Windows.Forms.TextBox
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddShot.vb b/BSMyLoadersLog/Adding/frmAddShot.vb
index 5159289..a6bf957 100644
--- a/BSMyLoadersLog/Adding/frmAddShot.vb
+++ b/BSMyLoadersLog/Adding/frmAddShot.vb
@@ -1,55 +1,107 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
+'Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddShot
- Public FromView As Boolean
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Manu
- txtName.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Name
- txtMat.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_mat
- txtShotNo.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_ShotNo
- txtPounds.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_weight
- txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Price
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddShot_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call AutoFill()
- End Sub
+Namespace Adding
+ ' TODO #20 Code Clean Up
+ '''
+ ''' Class FrmAddShot.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmAddShot
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Automatics the fill.
+ '''
+ '''
+ Sub AutoFill()
+ Try
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Manu
+ 'txtName.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Name
+ 'txtMat.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_mat
+ 'txtShotNo.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_ShotNo
+ 'txtPounds.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_weight
+ 'txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Price
+ txtManu.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtMat.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsMat(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtShotNo.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsShotNo(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPounds.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsWeight(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsPrice(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddShot control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddShot_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call AutoFill()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim manu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim sName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim mat As String = GeneralHelpers.FluffContent(txtMat.Text, "LEAD")
+ Dim shotNo As String = GeneralHelpers.FluffContent(txtShotNo.Text, "0")
+ Dim weight As String = GeneralHelpers.FluffContent(txtPounds.Text, "0")
+ Dim cost As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0.0)
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ 'Dim ounces As Double = WeightValues.WEIGHT_OZ_1LBS * CDbl(Weight)
+ 'Dim grams As Double = ounces * WeightValues.WEIGHT_GRAMS_OZ
+ 'Dim epps As Double = 0
+ 'If Cost > 0 Then epps = Cost / grams
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim Manu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim Name As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim Mat As String = GeneralHelpers.FluffContent(txtMat.Text, "LEAD")
- Dim ShotNo As String = GeneralHelpers.FluffContent(txtShotNo.Text, "0")
- Dim Weight As String = GeneralHelpers.FluffContent(txtPounds.Text, "0")
- Dim Cost As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0.0)
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- Dim ounces As Double = WeightOz1Lbs * CDbl(Weight)
- Dim grams As Double = ounces * WeightGramsOz
- Dim epps As Double = 0
- If Cost > 0 Then epps = Cost / grams
-
- If Not GeneralHelpers.IsRequired(Manu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(Name, "Name", Me.Text) Then Exit Sub
-
- SQL = "INSERT INTO List_SG_ShotType_Details(Manufacturer,Name,mat,ShotNo,weight,Price,ounces,grams,epps,IsSlug) VALUES('" & _
- Manu & "','" & Name & "','" & Mat & "','" & ShotNo & "','" & Weight & "'," & Cost & "," & ounces & _
- "," & grams & "," & epps & ",0)"
- Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Shot.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd_Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ If Not GeneralHelpers.IsRequired(manu, "Manufacturer",Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(sName, "Name",Text) Then Exit Sub
+ ' TODO Add Caliber Field is needed, to double check shit
+ Dim caliber as String = ""
+ If Not ShotgunShotTypeInventory.Add(DatabasePath, manu, sName, mat, weight, False,
+ shotNo, caliber, 0, cost, _errOut) Then Throw new Exception(_errOut)
+ 'SQL = "INSERT INTO List_SG_ShotType_Details(Manufacturer,Name,mat,ShotNo,weight,Price,ounces,grams,epps,IsSlug) VALUES('" & _
+ ' Manu & "','" & Name & "','" & Mat & "','" & ShotNo & "','" & Weight & "'," & Cost & "," & ounces & _
+ ' "," & grams & "," & epps & ",0)"
+ 'Obj.ConnExec(SQL)
+ If FromView Then Call FrmViewListShot.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddSlugs.Designer.vb b/BSMyLoadersLog/Adding/frmAddSlugs.Designer.vb
index fa648ac..998f39d 100644
--- a/BSMyLoadersLog/Adding/frmAddSlugs.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddSlugs.Designer.vb
@@ -1,215 +1,217 @@
- _
-Partial Class frmAddSlugs
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddSlugs
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddSlugs))
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtPounds = New System.Windows.Forms.TextBox
- Me.txtCal = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnAdd = New System.Windows.Forms.Button
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtPrice = New System.Windows.Forms.TextBox
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(12, 123)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(26, 13)
- Me.Label7.TabIndex = 27
- Me.Label7.Text = "Qty:"
- '
- 'txtPounds
- '
- Me.txtPounds.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPounds.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPounds.Location = New System.Drawing.Point(118, 95)
- Me.txtPounds.Name = "txtPounds"
- Me.txtPounds.Size = New System.Drawing.Size(165, 20)
- Me.txtPounds.TabIndex = 4
- '
- 'txtCal
- '
- Me.txtCal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtCal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtCal.Location = New System.Drawing.Point(118, 69)
- Me.txtCal.Name = "txtCal"
- Me.txtCal.Size = New System.Drawing.Size(165, 20)
- Me.txtCal.TabIndex = 3
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(118, 43)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(165, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(118, 17)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(165, 20)
- Me.txtManu.TabIndex = 1
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 98)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(44, 13)
- Me.Label4.TabIndex = 18
- Me.Label4.Text = "Weight:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 72)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 17
- Me.Label3.Text = "Caliber:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 46)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 16
- Me.Label2.Text = "Name:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 20)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 15
- Me.Label1.Text = "Manufacturer:"
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(118, 120)
- Me.nudQty.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(165, 20)
- Me.nudQty.TabIndex = 5
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(186, 179)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 8
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnAdd
- '
- Me.btnAdd.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnAdd.Location = New System.Drawing.Point(32, 180)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 7
- Me.btnAdd.Text = "&Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 148)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 19
- Me.Label5.Text = "Price:"
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(118, 145)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(165, 20)
- Me.txtPrice.TabIndex = 6
- '
- 'frmAddSlugs
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(300, 224)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtPounds)
- Me.Controls.Add(Me.txtCal)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddSlugs"
- Me.Text = "Add Slugs to Inventory"
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddSlugs))
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.txtPounds = New System.Windows.Forms.TextBox
+ Me.txtCal = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(12, 123)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(26, 13)
+ Me.Label7.TabIndex = 27
+ Me.Label7.Text = "Qty:"
+ '
+ 'txtPounds
+ '
+ Me.txtPounds.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPounds.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPounds.Location = New System.Drawing.Point(118, 95)
+ Me.txtPounds.Name = "txtPounds"
+ Me.txtPounds.Size = New System.Drawing.Size(165, 20)
+ Me.txtPounds.TabIndex = 4
+ '
+ 'txtCal
+ '
+ Me.txtCal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCal.Location = New System.Drawing.Point(118, 69)
+ Me.txtCal.Name = "txtCal"
+ Me.txtCal.Size = New System.Drawing.Size(165, 20)
+ Me.txtCal.TabIndex = 3
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(118, 43)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(165, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(118, 17)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(165, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 98)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(44, 13)
+ Me.Label4.TabIndex = 18
+ Me.Label4.Text = "Weight:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 72)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 17
+ Me.Label3.Text = "Caliber:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 46)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 16
+ Me.Label2.Text = "Name:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 20)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 15
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(118, 120)
+ Me.nudQty.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(165, 20)
+ Me.nudQty.TabIndex = 5
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(186, 179)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 8
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnAdd.Location = New System.Drawing.Point(32, 180)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 7
+ Me.btnAdd.Text = "&Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 148)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 19
+ Me.Label5.Text = "Price:"
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(118, 145)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(165, 20)
+ Me.txtPrice.TabIndex = 6
+ '
+ 'frmAddSlugs
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(300, 224)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtPounds)
+ Me.Controls.Add(Me.txtCal)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddSlugs"
+ Me.Text = "Add Slugs to Inventory"
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents txtPounds As System.Windows.Forms.TextBox
- Friend WithEvents txtCal As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
-End Class
+ End Sub
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents txtPounds As System.Windows.Forms.TextBox
+ Friend WithEvents txtCal As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddSlugs.vb b/BSMyLoadersLog/Adding/frmAddSlugs.vb
index 6010659..929b956 100644
--- a/BSMyLoadersLog/Adding/frmAddSlugs.vb
+++ b/BSMyLoadersLog/Adding/frmAddSlugs.vb
@@ -1,55 +1,100 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddSlugs
- Public FromView As Boolean
- Sub AutoFill()
- Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Manu
- txtName.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Name
- txtCal.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_CAL
- txtPounds.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_weight
- txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Price
- Catch ex As Exception
- Call LogError(Me.Name, "AutoFill", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmAddSlugs_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call AutoFill()
- End Sub
+Namespace Adding
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+ Public Class FrmAddSlugs
+ ' TODO #20 Code Clean Up
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Automatics the fill.
+ '''
+ '''
+ Sub AutoFill()
+ Try
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Manu
+ 'txtName.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Name
+ 'txtCal.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_CAL
+ 'txtPounds.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_weight
+ 'txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_SHOTSLUG_Details_Price
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim Manu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim Name As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim CAL As String = GeneralHelpers.FluffContent(txtCal.Text)
- Dim Qty As Integer = nudQty.Value
- Dim Weight As String = GeneralHelpers.FluffContent(txtPounds.Text)
- Dim Cost As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0.0)
- Dim epps As Double = 0
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
+ txtManu.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtCal.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsCaliber(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPounds.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsWeight(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = GeneralShotgun.TypeDetailsPrice(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoFill", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddSlugs control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddSlugs_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call AutoFill()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim manufacturer As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim itemName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim caliber As String = GeneralHelpers.FluffContent(txtCal.Text)
+ Dim qty As Integer = nudQty.Value
+ Dim weight As String = GeneralHelpers.FluffContent(txtPounds.Text)
+ Dim cost As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0.0)
+ 'Dim epps As Double = 0
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
- If Not GeneralHelpers.IsRequired(Manu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(Name, "Name", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(CAL, "Caliber", Me.Text) Then Exit Sub
- Dim EstCostPerItem As Double = 0
- If Cost <> 0 Then
- EstCostPerItem = (Cost / Qty)
- End If
- epps = EstCostPerItem
- SQL = "INSERT INTO List_SG_ShotType_Details(Manufacturer,Name,IsSlug,CAL,QTY,weight,epps,Price) VALUES('" & _
- Manu & "','" & Name & "',1,'" & CAL & "'," & Qty & ",'" & Weight & "'," & epps & "," & Cost & ")"
- Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Slug.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ If Not GeneralHelpers.IsRequired(manufacturer, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(itemName, "Name", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(caliber, "Caliber", Text) Then Exit Sub
+
+ If Not ShotgunShotTypeInventory.Add(DatabasePath, manufacturer, itemName, "", weight, True, "", caliber, qty, cost, _errOut) Then Throw New Exception(_errOut)
+ 'Dim EstCostPerItem As Double = 0
+ 'If cost <> 0 Then
+ ' EstCostPerItem = (cost / qty)
+ 'End If
+ 'epps = EstCostPerItem
+ 'SQL = "INSERT INTO List_SG_ShotType_Details(Manufacturer,Name,IsSlug,CAL,QTY,weight,epps,Price) VALUES('" & _
+ ' manufacturer & "','" & name & "',1,'" & caliber & "'," & qty & ",'" & weight & "'," & epps & "," & cost & ")"
+ 'Obj.ConnExec(SQL)
+ If FromView Then Call FrmViewListSlug.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddWad.Designer.vb b/BSMyLoadersLog/Adding/frmAddWad.Designer.vb
index 5dab60e..5449674 100644
--- a/BSMyLoadersLog/Adding/frmAddWad.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmAddWad.Designer.vb
@@ -1,248 +1,250 @@
- _
-Partial Class frmAddWad
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmAddWad
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddWad))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtWAD = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.cmdGauge = New System.Windows.Forms.ComboBox
- Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.txtLoad = New System.Windows.Forms.TextBox
- Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 9)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 40)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(103, 9)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(172, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtWAD
- '
- Me.txtWAD.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtWAD.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtWAD.Location = New System.Drawing.Point(103, 37)
- Me.txtWAD.Name = "txtWAD"
- Me.txtWAD.Size = New System.Drawing.Size(172, 20)
- Me.txtWAD.TabIndex = 2
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(27, 175)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 7
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.Location = New System.Drawing.Point(174, 175)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 8
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 116)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(26, 13)
- Me.Label3.TabIndex = 6
- Me.Label3.Text = "Qty:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 143)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(34, 13)
- Me.Label4.TabIndex = 7
- Me.Label4.Text = "Price:"
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(103, 140)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(172, 20)
- Me.txtPrice.TabIndex = 6
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(103, 114)
- Me.nudQty.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(172, 20)
- Me.nudQty.TabIndex = 5
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 66)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(42, 13)
- Me.Label5.TabIndex = 8
- Me.Label5.Text = "Gauge:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 92)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(80, 13)
- Me.Label6.TabIndex = 9
- Me.Label6.Text = "Max Load (oz.):"
- '
- 'cmdGauge
- '
- Me.cmdGauge.DataSource = Me.ListSGGaugeBindingSource
- Me.cmdGauge.DisplayMember = "ga"
- Me.cmdGauge.FormattingEnabled = True
- Me.cmdGauge.Location = New System.Drawing.Point(103, 63)
- Me.cmdGauge.Name = "cmdGauge"
- Me.cmdGauge.Size = New System.Drawing.Size(172, 21)
- Me.cmdGauge.TabIndex = 3
- Me.cmdGauge.ValueMember = "ID"
- '
- 'ListSGGaugeBindingSource
- '
- Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
- Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'txtLoad
- '
- Me.txtLoad.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtLoad.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtLoad.Location = New System.Drawing.Point(103, 89)
- Me.txtLoad.Name = "txtLoad"
- Me.txtLoad.Size = New System.Drawing.Size(172, 20)
- Me.txtLoad.TabIndex = 4
- '
- 'List_SG_GaugeTableAdapter
- '
- Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
- '
- 'frmAddWad
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(287, 224)
- Me.Controls.Add(Me.txtLoad)
- Me.Controls.Add(Me.cmdGauge)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtWAD)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Add WADs to Inventory")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Add WADs to Inventory")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmAddWad"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Add WAD"
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddWad))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtWAD = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.cmdGauge = New System.Windows.Forms.ComboBox
+ Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.txtLoad = New System.Windows.Forms.TextBox
+ Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 40)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(103, 9)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(172, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtWAD
+ '
+ Me.txtWAD.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtWAD.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtWAD.Location = New System.Drawing.Point(103, 37)
+ Me.txtWAD.Name = "txtWAD"
+ Me.txtWAD.Size = New System.Drawing.Size(172, 20)
+ Me.txtWAD.TabIndex = 2
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(27, 175)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 7
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(174, 175)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 8
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 116)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(26, 13)
+ Me.Label3.TabIndex = 6
+ Me.Label3.Text = "Qty:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 143)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(34, 13)
+ Me.Label4.TabIndex = 7
+ Me.Label4.Text = "Price:"
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(103, 140)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(172, 20)
+ Me.txtPrice.TabIndex = 6
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(103, 114)
+ Me.nudQty.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(172, 20)
+ Me.nudQty.TabIndex = 5
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 66)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(42, 13)
+ Me.Label5.TabIndex = 8
+ Me.Label5.Text = "Gauge:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 92)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(80, 13)
+ Me.Label6.TabIndex = 9
+ Me.Label6.Text = "Max Load (oz.):"
+ '
+ 'cmdGauge
+ '
+ Me.cmdGauge.DataSource = Me.ListSGGaugeBindingSource
+ Me.cmdGauge.DisplayMember = "ga"
+ Me.cmdGauge.FormattingEnabled = True
+ Me.cmdGauge.Location = New System.Drawing.Point(103, 63)
+ Me.cmdGauge.Name = "cmdGauge"
+ Me.cmdGauge.Size = New System.Drawing.Size(172, 21)
+ Me.cmdGauge.TabIndex = 3
+ Me.cmdGauge.ValueMember = "ID"
+ '
+ 'ListSGGaugeBindingSource
+ '
+ Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
+ Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'txtLoad
+ '
+ Me.txtLoad.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLoad.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLoad.Location = New System.Drawing.Point(103, 89)
+ Me.txtLoad.Name = "txtLoad"
+ Me.txtLoad.Size = New System.Drawing.Size(172, 20)
+ Me.txtLoad.TabIndex = 4
+ '
+ 'List_SG_GaugeTableAdapter
+ '
+ Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
+ '
+ 'frmAddWad
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(287, 224)
+ Me.Controls.Add(Me.txtLoad)
+ Me.Controls.Add(Me.cmdGauge)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtWAD)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Add WADs to Inventory")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Add WADs to Inventory")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmAddWad"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Add WAD"
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtWAD As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents cmdGauge As System.Windows.Forms.ComboBox
- Friend WithEvents txtLoad As System.Windows.Forms.TextBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtWAD As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents cmdGauge As System.Windows.Forms.ComboBox
+ Friend WithEvents txtLoad As System.Windows.Forms.TextBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmAddWad.vb b/BSMyLoadersLog/Adding/frmAddWad.vb
index 2a65732..b9c78a3 100644
--- a/BSMyLoadersLog/Adding/frmAddWad.vb
+++ b/BSMyLoadersLog/Adding/frmAddWad.vb
@@ -1,69 +1,108 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
-Public Class frmAddWad
+Namespace Adding
+ ' TODO #20 Code Clean Up
'''
- ''' The error out
+ ''' Class FrmAddWad.
+ ''' Implements the
'''
- Dim errOut as String
- Sub AutoLoad()
- Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_WAD_Manufacturer
- txtWAD.AutoCompleteCustomSource = ObjAF.List_SG_WAD_WAD
- txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_WAD_Price
- Catch ex As Exception
- Call LogError(Me.Name, "AutoLoad", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-
- Sub SaveData()
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtWAD.Text)
- Dim intQty As Integer = nudQty.Value
- Dim dPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
- Dim sLoad As String = GeneralHelpers.FluffContent(txtLoad.Text, "0")
- Dim dLoad As Double = Converters.ConvertOZToDouble(sLoad, errOut)
- Dim GName As String = cmdGauge.Text
- Dim GID As Integer = cmdGauge.SelectedValue
- Dim eppw As Double = 0
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- If dPrice <> 0 Then
- eppw = (dPrice / intQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO List_SG_WAD (Manufacturer,WAD,Qty,Price,eppw,gauge,GID,load_t,load_d) VALUES('" & _
- strManu & "','" & strName & "'," & intQty & "," & dPrice & "," & eppw & _
- ",'" & GName & "'," & GID & ",'" & sLoad & "'," & dLoad & ")"
- Obj.ConnExec(SQL)
- Dim sAns As String = MsgBox(strManu & " " & strName & " was added to the database." & _
- Chr(10) & "Do you wish to add another?", MsgBoxStyle.YesNo, Me.Text)
- If sAns = vbNo Then
- Me.Close()
- Else
- txtManu.Text = ""
- txtWAD.Text = ""
- txtLoad.Text = ""
- nudQty.Value = 0
- txtPrice.Text = ""
- Call AutoLoad()
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
+ '''
+ Public Class FrmAddWad
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' Automatics the load.
+ '''
+ '''
+ Sub AutoLoad()
+ Try
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_WAD_Manufacturer
+ 'txtWAD.AutoCompleteCustomSource = ObjAF.List_SG_WAD_WAD
+ 'txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_WAD_Price
+ txtManu.AutoCompleteCustomSource = ConfigShotgun.WadManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtWAD.AutoCompleteCustomSource = ConfigShotgun.Wads(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = ConfigShotgun.WadPrice(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoLoad", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim manufacturer As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim itemName As String = GeneralHelpers.FluffContent(txtWAD.Text)
+ Dim qty As Integer = nudQty.Value
+ Dim price As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
+ Dim loadValue As String = GeneralHelpers.FluffContent(txtLoad.Text, "0")
+ 'Dim doubleLoadValue As Double = Converters.ConvertOZToDouble(loadValue, errOut)
+ Dim gaugeName As String = cmdGauge.Text
+ Dim gaugeId As Integer = cmdGauge.SelectedValue
+ 'Dim eppw As Double = 0
+ If Not GeneralHelpers.IsRequired(manufacturer, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(itemName, "Name", Text) Then Exit Sub
- Private Sub frmAddWad_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Me.List_SG_GaugeTableAdapter.Fill(Me.MLLDataSet.List_SG_Gauge)
- Call AutoLoad()
- End Sub
+ If Not WadInventory.Add(DatabasePath, manufacturer, itemName, gaugeName, gaugeId,
+ loadValue, qty, price, _errOut) Then Throw new Exception(_errOut)
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Call SaveData()
- End Sub
-End Class
\ No newline at end of file
+ 'If price <> 0 Then
+ ' eppw = (price / qty)
+ 'End If
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "INSERT INTO List_SG_WAD (Manufacturer,WAD,Qty,Price,eppw,gauge,GID,load_t,load_d) VALUES('" & _
+ ' manufacturer & "','" & itemName & "'," & qty & "," & price & "," & eppw & _
+ ' ",'" & gaugeName & "'," & gaugeId & ",'" & loadValue & "'," & doubleLoadValue & ")"
+ 'Obj.ConnExec(SQL)
+ Dim sAns As String = MsgBox(manufacturer & " " & itemName & " was added to the database." & _
+ Chr(10) & "Do you wish to add another?", MsgBoxStyle.YesNo, Text)
+ If sAns = vbNo Then
+ Close()
+ Else
+ txtManu.Text = ""
+ txtWAD.Text = ""
+ txtLoad.Text = ""
+ nudQty.Value = 0
+ txtPrice.Text = ""
+ Call AutoLoad()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Load event of the frmAddWad control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmAddWad_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ List_SG_GaugeTableAdapter.Fill(MLLDataSet.List_SG_Gauge)
+ Call AutoLoad()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.Designer.vb
index 6bca393..f8453a5 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.Designer.vb
@@ -1,197 +1,199 @@
- _
-Partial Class frmConfig_Add_Wizard
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizard
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- MyBase.Dispose(disposing)
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.txtConfigID = New System.Windows.Forms.TextBox
- Me.chkRP = New System.Windows.Forms.CheckBox
- Me.chkShotgun = New System.Windows.Forms.CheckBox
- Me.cmbCal = New System.Windows.Forms.ComboBox
- Me.ListCalibersBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSetBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.List_CalibersTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
- Me.Label4 = New System.Windows.Forms.Label
- Me.btnNext = New System.Windows.Forms.Button
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSetBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(7, 52)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(86, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Configuration ID:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(7, 77)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(34, 13)
- Me.Label2.TabIndex = 2
- Me.Label2.Text = "Type:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(7, 102)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 3
- Me.Label3.Text = "Caliber:"
- '
- 'txtConfigID
- '
- Me.txtConfigID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtConfigID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtConfigID.Location = New System.Drawing.Point(99, 49)
- Me.txtConfigID.Name = "txtConfigID"
- Me.txtConfigID.Size = New System.Drawing.Size(195, 20)
- Me.txtConfigID.TabIndex = 4
- '
- 'chkRP
- '
- Me.chkRP.AutoSize = True
- Me.chkRP.Location = New System.Drawing.Point(99, 76)
- Me.chkRP.Name = "chkRP"
- Me.chkRP.Size = New System.Drawing.Size(77, 17)
- Me.chkRP.TabIndex = 5
- Me.chkRP.Text = "Rifle/Pistol"
- Me.chkRP.UseVisualStyleBackColor = True
- '
- 'chkShotgun
- '
- Me.chkShotgun.AutoSize = True
- Me.chkShotgun.Location = New System.Drawing.Point(195, 76)
- Me.chkShotgun.Name = "chkShotgun"
- Me.chkShotgun.Size = New System.Drawing.Size(66, 17)
- Me.chkShotgun.TabIndex = 6
- Me.chkShotgun.Text = "Shotgun"
- Me.chkShotgun.UseVisualStyleBackColor = True
- '
- 'cmbCal
- '
- Me.cmbCal.DataSource = Me.ListCalibersBindingSource
- Me.cmbCal.DisplayMember = "Cal"
- Me.cmbCal.FormattingEnabled = True
- Me.cmbCal.Location = New System.Drawing.Point(99, 99)
- Me.cmbCal.Name = "cmbCal"
- Me.cmbCal.Size = New System.Drawing.Size(195, 21)
- Me.cmbCal.TabIndex = 7
- Me.cmbCal.ValueMember = "ID"
- '
- 'ListCalibersBindingSource
- '
- Me.ListCalibersBindingSource.DataMember = "List_Calibers"
- Me.ListCalibersBindingSource.DataSource = Me.MLLDataSetBindingSource
- '
- 'MLLDataSetBindingSource
- '
- Me.MLLDataSetBindingSource.DataSource = Me.MLLDataSet
- Me.MLLDataSetBindingSource.Position = 0
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'List_CalibersTableAdapter
- '
- Me.List_CalibersTableAdapter.ClearBeforeFill = True
- '
- 'Label4
- '
- Me.Label4.Location = New System.Drawing.Point(7, 8)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(320, 38)
- Me.Label4.TabIndex = 8
- Me.Label4.Text = "The Add Configuration Sheet Wizard will walk you through adding a new load to the" & _
- " database."
- '
- 'btnNext
- '
- Me.btnNext.Location = New System.Drawing.Point(219, 126)
- Me.btnNext.Name = "btnNext"
- Me.btnNext.Size = New System.Drawing.Size(75, 23)
- Me.btnNext.TabIndex = 9
- Me.btnNext.Text = "Next"
- Me.btnNext.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmConfig_Add_Wizard
- '
- Me.AcceptButton = Me.btnNext
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(331, 159)
- Me.Controls.Add(Me.btnNext)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.cmbCal)
- Me.Controls.Add(Me.chkShotgun)
- Me.Controls.Add(Me.chkRP)
- Me.Controls.Add(Me.txtConfigID)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Add Configuration Sheet Wizard"
- CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSetBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizard))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.txtConfigID = New System.Windows.Forms.TextBox
+ Me.chkRP = New System.Windows.Forms.CheckBox
+ Me.chkShotgun = New System.Windows.Forms.CheckBox
+ Me.cmbCal = New System.Windows.Forms.ComboBox
+ Me.ListCalibersBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSetBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.List_CalibersTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.btnNext = New System.Windows.Forms.Button
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSetBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(7, 52)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(86, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Configuration ID:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(7, 77)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(34, 13)
+ Me.Label2.TabIndex = 2
+ Me.Label2.Text = "Type:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(7, 102)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 3
+ Me.Label3.Text = "Caliber:"
+ '
+ 'txtConfigID
+ '
+ Me.txtConfigID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtConfigID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtConfigID.Location = New System.Drawing.Point(99, 49)
+ Me.txtConfigID.Name = "txtConfigID"
+ Me.txtConfigID.Size = New System.Drawing.Size(195, 20)
+ Me.txtConfigID.TabIndex = 4
+ '
+ 'chkRP
+ '
+ Me.chkRP.AutoSize = True
+ Me.chkRP.Location = New System.Drawing.Point(99, 76)
+ Me.chkRP.Name = "chkRP"
+ Me.chkRP.Size = New System.Drawing.Size(77, 17)
+ Me.chkRP.TabIndex = 5
+ Me.chkRP.Text = "Rifle/Pistol"
+ Me.chkRP.UseVisualStyleBackColor = True
+ '
+ 'chkShotgun
+ '
+ Me.chkShotgun.AutoSize = True
+ Me.chkShotgun.Location = New System.Drawing.Point(195, 76)
+ Me.chkShotgun.Name = "chkShotgun"
+ Me.chkShotgun.Size = New System.Drawing.Size(66, 17)
+ Me.chkShotgun.TabIndex = 6
+ Me.chkShotgun.Text = "Shotgun"
+ Me.chkShotgun.UseVisualStyleBackColor = True
+ '
+ 'cmbCal
+ '
+ Me.cmbCal.DataSource = Me.ListCalibersBindingSource
+ Me.cmbCal.DisplayMember = "Cal"
+ Me.cmbCal.FormattingEnabled = True
+ Me.cmbCal.Location = New System.Drawing.Point(99, 99)
+ Me.cmbCal.Name = "cmbCal"
+ Me.cmbCal.Size = New System.Drawing.Size(195, 21)
+ Me.cmbCal.TabIndex = 7
+ Me.cmbCal.ValueMember = "ID"
+ '
+ 'ListCalibersBindingSource
+ '
+ Me.ListCalibersBindingSource.DataMember = "List_Calibers"
+ Me.ListCalibersBindingSource.DataSource = Me.MLLDataSetBindingSource
+ '
+ 'MLLDataSetBindingSource
+ '
+ Me.MLLDataSetBindingSource.DataSource = Me.MLLDataSet
+ Me.MLLDataSetBindingSource.Position = 0
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'List_CalibersTableAdapter
+ '
+ Me.List_CalibersTableAdapter.ClearBeforeFill = True
+ '
+ 'Label4
+ '
+ Me.Label4.Location = New System.Drawing.Point(7, 8)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(320, 38)
+ Me.Label4.TabIndex = 8
+ Me.Label4.Text = "The Add Configuration Sheet Wizard will walk you through adding a new load to the" & _
+ " database."
+ '
+ 'btnNext
+ '
+ Me.btnNext.Location = New System.Drawing.Point(219, 126)
+ Me.btnNext.Name = "btnNext"
+ Me.btnNext.Size = New System.Drawing.Size(75, 23)
+ Me.btnNext.TabIndex = 9
+ Me.btnNext.Text = "Next"
+ Me.btnNext.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmConfig_Add_Wizard
+ '
+ Me.AcceptButton = Me.btnNext
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(331, 159)
+ Me.Controls.Add(Me.btnNext)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.cmbCal)
+ Me.Controls.Add(Me.chkShotgun)
+ Me.Controls.Add(Me.chkRP)
+ Me.Controls.Add(Me.txtConfigID)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizard"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Add Configuration Sheet Wizard"
+ CType(Me.ListCalibersBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSetBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txtConfigID As System.Windows.Forms.TextBox
- Friend WithEvents chkRP As System.Windows.Forms.CheckBox
- Friend WithEvents chkShotgun As System.Windows.Forms.CheckBox
- Friend WithEvents cmbCal As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSetBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListCalibersBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_CalibersTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents btnNext As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents txtConfigID As System.Windows.Forms.TextBox
+ Friend WithEvents chkRP As System.Windows.Forms.CheckBox
+ Friend WithEvents chkShotgun As System.Windows.Forms.CheckBox
+ Friend WithEvents cmbCal As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSetBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListCalibersBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_CalibersTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CalibersTableAdapter
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents btnNext As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.vb
index d1b05cc..a7f48c4 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard.vb
@@ -1,87 +1,132 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Helpers
-Public Class frmConfig_Add_Wizard
- Private Sub frmConfig_Add_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.List_CalibersTableAdapter.Fill(Me.MLLDataSet.List_Calibers)
- Dim Obj As New AutoFillCollections
- txtConfigID.AutoCompleteCustomSource = Obj.ConfigName
- chkShotgun.Enabled = UseShotgun
- If LoadertypeShotgun And LoadertypeNonshotgun Then
- chkShotgun.Checked = False
- chkRP.Checked = False
- ElseIf LoadertypeNonshotgun And Not LoadertypeShotgun Then
- chkShotgun.Checked = False
- chkRP.Checked = True
- chkShotgun.Enabled = False
- ElseIf Not LoadertypeNonshotgun And LoadertypeShotgun Then
- chkShotgun.Checked = True
- chkRP.Checked = False
- chkRP.Enabled = False
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-
- Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
- Try
- Dim strConfigName As String = GeneralHelpers.FluffContent(txtConfigID.Text)
- Dim bRP As Boolean = chkRP.Checked
- Dim bSG As Boolean = chkShotgun.Checked
- Dim lngCal As Long = cmbCal.SelectedValue
- Dim LoadType As Integer = 0
- If bSG Then LoadType = 1
- If Not GeneralHelpers.IsRequired(strConfigName, "Configuration ID", Me.Text) Then Exit Sub
- Dim Obj As New BSDatabase
- Dim ObjG As New GlobalFunctions
- Dim SQL As String = ""
- Dim MyID As Long = 0
- If ObjG.ObjectExistsinDB(strConfigName, "ConfigName", "Config_List_Name") Then
- Dim sAns As String = MsgBox(strConfigName & " already exists!" & Chr(10) & "Do you wish to overwrite?", MsgBoxStyle.YesNo)
- If sAns = vbYes Then
- MyID = ObjG.GetID("SELECT * from Config_list_Name where ConfigName='" & strConfigName & "'")
- SQL = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & MyID
- Obj.ConnExec(SQL)
- SQL = "DELETE from Config_List_Data_NSG where CLNID=" & MyID
- Obj.ConnExec(SQL)
- Else
- Exit Sub
+Namespace Adding
+ ' TODO #20 Code Clean Up
+ '''
+ ''' Class frmConfig_Add_Wizard.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmConfigAddWizard
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' Handles the Load event of the frmConfig_Add control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub frmConfig_Add_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ List_CalibersTableAdapter.Fill(MLLDataSet.List_Calibers)
+ 'Dim Obj As New AutoFillCollections
+ 'txtConfigID.AutoCompleteCustomSource = Obj.ConfigName
+ txtConfigID.AutoCompleteCustomSource = ConfigMetalic.ConfigName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ chkShotgun.Enabled = UseShotgun
+ If LoaderTypeShotGun And LoaderTypeMetalic Then
+ chkShotgun.Checked = False
+ chkRP.Checked = False
+ ElseIf LoaderTypeMetalic And Not LoaderTypeShotGun Then
+ chkShotgun.Checked = False
+ chkRP.Checked = True
+ chkShotgun.Enabled = False
+ ElseIf Not LoaderTypeMetalic And LoaderTypeShotGun Then
+ chkShotgun.Checked = True
+ chkRP.Checked = False
+ chkRP.Enabled = False
End If
- Else
- SQL = "INSERT INTO Config_List_Name(ConfigName,IsPersonal,IsShotGun) VALUES('" & _
- strConfigName & "',1," & LoadType & ")"
- Obj.ConnExec(SQL)
- MyID = ObjG.GetID("SELECT * from Config_list_Name where ConfigName='" & strConfigName & "'")
- End If
- If bRP Then
- frmConfig_Add_Wizard_RP_1.ConfigName = strConfigName
- frmConfig_Add_Wizard_RP_1.CalID = lngCal
- frmConfig_Add_Wizard_RP_1.ConfigID = MyID
- frmConfig_Add_Wizard_RP_1.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_RP_1.Show()
- Me.Close()
- End If
- If bSG Then
- frmConfig_Add_Wizard_SG_1.ConfigName = strConfigName
- frmConfig_Add_Wizard_SG_1.CalID = lngCal
- frmConfig_Add_Wizard_SG_1.ConfigID = MyID
- frmConfig_Add_Wizard_SG_1.CalName = cmbCal.Text
- frmConfig_Add_Wizard_SG_1.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_SG_1.Show()
- Me.Close()
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "btnNext", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-
- Private Sub chkRP_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkRP.CheckedChanged
- If chkShotgun.Checked Then chkShotgun.Checked = False
- End Sub
-
- Private Sub chkShotgun_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkShotgun.CheckedChanged
- If chkRP.Checked Then chkRP.Checked = False
- End Sub
-End Class
\ No newline at end of file
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnNext control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click
+ Try
+ Dim configName As String = GeneralHelpers.FluffContent(txtConfigID.Text)
+ Dim isMetallic As Boolean = chkRP.Checked
+ Dim isShotgun As Boolean = chkShotgun.Checked
+ Dim caliberId As Long = cmbCal.SelectedValue
+ 'Dim loadType As Integer = 0
+ 'If isShotgun Then loadType = 1
+ If Not GeneralHelpers.IsRequired(configName, "Configuration ID", Text) Then Exit Sub
+
+ 'Dim Obj As New BSDatabase
+ 'Dim ObjG As New GlobalFunctions
+ 'Dim SQL As String = ""
+ Dim configId As Long = 0
+ If ConfigListDataName.DataExists(DatabasePath, configName, _errOut) Then
+ Dim sAns As String = MsgBox($"{configName} already exists! {Environment.NewLine} Do you wish to overwrite?", MsgBoxStyle.YesNo)
+ If sAns = vbNo Then Exit Sub
+ configId = ConfigListDataName.GetId(DatabasePath, configName, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ If Not ConfigListDataName.Delete(DatabasePath, configId, _errOut) Then Throw New Exception(_errOut)
+ Else
+ If Not ConfigListDataName.Add(DatabasePath, configName, True, isShotgun, " ",
+ True, False, _errOut) Then Throw New Exception(_errOut)
+ End If
+ 'If ObjG.ObjectExistsinDB(configName, "ConfigName", "Config_List_Name") Then
+ ' Dim sAns As String = MsgBox(configName & " already exists!" & Chr(10) & "Do you wish to overwrite?", MsgBoxStyle.YesNo)
+ ' If sAns = vbYes Then
+ ' configId = ObjG.GetID("SELECT * from Config_list_Name where ConfigName='" & configName & "'")
+ ' SQL = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & configId
+ ' Obj.ConnExec(SQL)
+ ' SQL = "DELETE from Config_List_Data_NSG where CLNID=" & configId
+ ' Obj.ConnExec(SQL)
+ ' Else
+ ' Exit Sub
+ ' End If
+ 'Else
+ ' SQL = "INSERT INTO Config_List_Name(ConfigName,IsPersonal,IsShotGun) VALUES('" & _
+ ' configName & "',1," & loadType & ")"
+ ' Obj.ConnExec(SQL)
+ ' configId = ObjG.GetID("SELECT * from Config_list_Name where ConfigName='" & configName & "'")
+ 'End If
+ If isMetallic Then
+ FrmConfigAddWizardRp1.ConfigName = configName
+ FrmConfigAddWizardRp1.CaliberId = caliberId
+ FrmConfigAddWizardRp1.ConfigId = configId
+ FrmConfigAddWizardRp1.MdiParent = MdiParent
+ FrmConfigAddWizardRp1.Show()
+ Close()
+ End If
+ If isShotgun Then
+ FrmConfigAddWizardSg1.ConfigName = configName
+ FrmConfigAddWizardSg1.CaliberId = caliberId
+ FrmConfigAddWizardSg1.ConfigId = configId
+ FrmConfigAddWizardSg1.CaliberName = cmbCal.Text
+ FrmConfigAddWizardSg1.MdiParent = MdiParent
+ FrmConfigAddWizardSg1.Show()
+ Close()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "btnNext", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkRP control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkRP_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkRP.CheckedChanged
+ If chkShotgun.Checked Then chkShotgun.Checked = False
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkShotgun control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkShotgun_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkShotgun.CheckedChanged
+ If chkRP.Checked Then chkRP.Checked = False
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.Designer.vb
index 714fad1..ca553fb 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.Designer.vb
@@ -1,329 +1,331 @@
- _
-Partial Class frmConfig_Add_Wizard_Powder
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizardPowder
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard_Powder))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.Label7 = New System.Windows.Forms.Label
- Me.Label8 = New System.Windows.Forms.Label
- Me.Label9 = New System.Windows.Forms.Label
- Me.Label10 = New System.Windows.Forms.Label
- Me.cmbPowder = New System.Windows.Forms.ComboBox
- Me.GeneralPowderBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.General_PowderTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PowderTableAdapter
- Me.txtLMin = New System.Windows.Forms.TextBox
- Me.txtLMid = New System.Windows.Forms.TextBox
- Me.txtLMax = New System.Windows.Forms.TextBox
- Me.txtMVMin = New System.Windows.Forms.TextBox
- Me.txtMVMid = New System.Windows.Forms.TextBox
- Me.txtMVMax = New System.Windows.Forms.TextBox
- Me.txtCUPSMin = New System.Windows.Forms.TextBox
- Me.txtCUPSMid = New System.Windows.Forms.TextBox
- Me.txtCUPSMax = New System.Windows.Forms.TextBox
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.GeneralPowderBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 21)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(46, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Powder:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 49)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(54, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Load Min:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 75)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(102, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Load Mid/Preferred:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 101)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(57, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Load Max:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 127)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(103, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Min Muzzle Velocity:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 152)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(103, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Mid Muzzle Velocity:"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(12, 179)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(106, 13)
- Me.Label7.TabIndex = 6
- Me.Label7.Text = "Max Muzzle Velocity:"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(12, 205)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(112, 13)
- Me.Label8.TabIndex = 7
- Me.Label8.Text = "Min Pressure C.U.P.S:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(12, 229)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(112, 13)
- Me.Label9.TabIndex = 8
- Me.Label9.Text = "Mid Pressure C.U.P.S:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(13, 255)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(115, 13)
- Me.Label10.TabIndex = 9
- Me.Label10.Text = "Max Pressure C.U.P.S:"
- '
- 'cmbPowder
- '
- Me.cmbPowder.DataSource = Me.GeneralPowderBindingSource
- Me.cmbPowder.DisplayMember = "Name"
- Me.cmbPowder.FormattingEnabled = True
- Me.cmbPowder.Location = New System.Drawing.Point(134, 18)
- Me.cmbPowder.Name = "cmbPowder"
- Me.cmbPowder.Size = New System.Drawing.Size(166, 21)
- Me.cmbPowder.TabIndex = 10
- Me.cmbPowder.ValueMember = "ID"
- '
- 'GeneralPowderBindingSource
- '
- Me.GeneralPowderBindingSource.DataMember = "General_Powder"
- Me.GeneralPowderBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'General_PowderTableAdapter
- '
- Me.General_PowderTableAdapter.ClearBeforeFill = True
- '
- 'txtLMin
- '
- Me.txtLMin.Location = New System.Drawing.Point(134, 46)
- Me.txtLMin.Name = "txtLMin"
- Me.txtLMin.Size = New System.Drawing.Size(166, 20)
- Me.txtLMin.TabIndex = 11
- '
- 'txtLMid
- '
- Me.txtLMid.Location = New System.Drawing.Point(134, 72)
- Me.txtLMid.Name = "txtLMid"
- Me.txtLMid.Size = New System.Drawing.Size(166, 20)
- Me.txtLMid.TabIndex = 12
- '
- 'txtLMax
- '
- Me.txtLMax.Location = New System.Drawing.Point(134, 98)
- Me.txtLMax.Name = "txtLMax"
- Me.txtLMax.Size = New System.Drawing.Size(166, 20)
- Me.txtLMax.TabIndex = 13
- '
- 'txtMVMin
- '
- Me.txtMVMin.Location = New System.Drawing.Point(134, 124)
- Me.txtMVMin.Name = "txtMVMin"
- Me.txtMVMin.Size = New System.Drawing.Size(166, 20)
- Me.txtMVMin.TabIndex = 14
- '
- 'txtMVMid
- '
- Me.txtMVMid.Location = New System.Drawing.Point(134, 149)
- Me.txtMVMid.Name = "txtMVMid"
- Me.txtMVMid.Size = New System.Drawing.Size(166, 20)
- Me.txtMVMid.TabIndex = 15
- '
- 'txtMVMax
- '
- Me.txtMVMax.Location = New System.Drawing.Point(134, 176)
- Me.txtMVMax.Name = "txtMVMax"
- Me.txtMVMax.Size = New System.Drawing.Size(166, 20)
- Me.txtMVMax.TabIndex = 16
- '
- 'txtCUPSMin
- '
- Me.txtCUPSMin.Location = New System.Drawing.Point(134, 202)
- Me.txtCUPSMin.Name = "txtCUPSMin"
- Me.txtCUPSMin.Size = New System.Drawing.Size(166, 20)
- Me.txtCUPSMin.TabIndex = 17
- '
- 'txtCUPSMid
- '
- Me.txtCUPSMid.Location = New System.Drawing.Point(134, 226)
- Me.txtCUPSMid.Name = "txtCUPSMid"
- Me.txtCUPSMid.Size = New System.Drawing.Size(166, 20)
- Me.txtCUPSMid.TabIndex = 18
- '
- 'txtCUPSMax
- '
- Me.txtCUPSMax.Location = New System.Drawing.Point(134, 252)
- Me.txtCUPSMax.Name = "txtCUPSMax"
- Me.txtCUPSMax.Size = New System.Drawing.Size(166, 20)
- Me.txtCUPSMax.TabIndex = 19
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(31, 286)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(83, 23)
- Me.btnAdd.TabIndex = 20
- Me.btnAdd.Text = "Add && Finish"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(178, 286)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 21
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmConfig_Add_Wizard_Powder
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(318, 321)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtCUPSMax)
- Me.Controls.Add(Me.txtCUPSMid)
- Me.Controls.Add(Me.txtCUPSMin)
- Me.Controls.Add(Me.txtMVMax)
- Me.Controls.Add(Me.txtMVMid)
- Me.Controls.Add(Me.txtMVMin)
- Me.Controls.Add(Me.txtLMax)
- Me.Controls.Add(Me.txtLMid)
- Me.Controls.Add(Me.txtLMin)
- Me.Controls.Add(Me.cmbPowder)
- Me.Controls.Add(Me.Label10)
- Me.Controls.Add(Me.Label9)
- Me.Controls.Add(Me.Label8)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard_Powder"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Add Configuration - Powder Details"
- CType(Me.GeneralPowderBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizardPowder))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.Label9 = New System.Windows.Forms.Label
+ Me.Label10 = New System.Windows.Forms.Label
+ Me.cmbPowder = New System.Windows.Forms.ComboBox
+ Me.GeneralPowderBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.General_PowderTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PowderTableAdapter
+ Me.txtLMin = New System.Windows.Forms.TextBox
+ Me.txtLMid = New System.Windows.Forms.TextBox
+ Me.txtLMax = New System.Windows.Forms.TextBox
+ Me.txtMVMin = New System.Windows.Forms.TextBox
+ Me.txtMVMid = New System.Windows.Forms.TextBox
+ Me.txtMVMax = New System.Windows.Forms.TextBox
+ Me.txtCUPSMin = New System.Windows.Forms.TextBox
+ Me.txtCUPSMid = New System.Windows.Forms.TextBox
+ Me.txtCUPSMax = New System.Windows.Forms.TextBox
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.GeneralPowderBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 21)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(46, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Powder:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 49)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(54, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Load Min:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 75)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(102, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Load Mid/Preferred:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 101)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(57, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Load Max:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 127)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(103, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Min Muzzle Velocity:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 152)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(103, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Mid Muzzle Velocity:"
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(12, 179)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(106, 13)
+ Me.Label7.TabIndex = 6
+ Me.Label7.Text = "Max Muzzle Velocity:"
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(12, 205)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(112, 13)
+ Me.Label8.TabIndex = 7
+ Me.Label8.Text = "Min Pressure C.U.P.S:"
+ '
+ 'Label9
+ '
+ Me.Label9.AutoSize = True
+ Me.Label9.Location = New System.Drawing.Point(12, 229)
+ Me.Label9.Name = "Label9"
+ Me.Label9.Size = New System.Drawing.Size(112, 13)
+ Me.Label9.TabIndex = 8
+ Me.Label9.Text = "Mid Pressure C.U.P.S:"
+ '
+ 'Label10
+ '
+ Me.Label10.AutoSize = True
+ Me.Label10.Location = New System.Drawing.Point(13, 255)
+ Me.Label10.Name = "Label10"
+ Me.Label10.Size = New System.Drawing.Size(115, 13)
+ Me.Label10.TabIndex = 9
+ Me.Label10.Text = "Max Pressure C.U.P.S:"
+ '
+ 'cmbPowder
+ '
+ Me.cmbPowder.DataSource = Me.GeneralPowderBindingSource
+ Me.cmbPowder.DisplayMember = "Name"
+ Me.cmbPowder.FormattingEnabled = True
+ Me.cmbPowder.Location = New System.Drawing.Point(134, 18)
+ Me.cmbPowder.Name = "cmbPowder"
+ Me.cmbPowder.Size = New System.Drawing.Size(166, 21)
+ Me.cmbPowder.TabIndex = 10
+ Me.cmbPowder.ValueMember = "ID"
+ '
+ 'GeneralPowderBindingSource
+ '
+ Me.GeneralPowderBindingSource.DataMember = "General_Powder"
+ Me.GeneralPowderBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'General_PowderTableAdapter
+ '
+ Me.General_PowderTableAdapter.ClearBeforeFill = True
+ '
+ 'txtLMin
+ '
+ Me.txtLMin.Location = New System.Drawing.Point(134, 46)
+ Me.txtLMin.Name = "txtLMin"
+ Me.txtLMin.Size = New System.Drawing.Size(166, 20)
+ Me.txtLMin.TabIndex = 11
+ '
+ 'txtLMid
+ '
+ Me.txtLMid.Location = New System.Drawing.Point(134, 72)
+ Me.txtLMid.Name = "txtLMid"
+ Me.txtLMid.Size = New System.Drawing.Size(166, 20)
+ Me.txtLMid.TabIndex = 12
+ '
+ 'txtLMax
+ '
+ Me.txtLMax.Location = New System.Drawing.Point(134, 98)
+ Me.txtLMax.Name = "txtLMax"
+ Me.txtLMax.Size = New System.Drawing.Size(166, 20)
+ Me.txtLMax.TabIndex = 13
+ '
+ 'txtMVMin
+ '
+ Me.txtMVMin.Location = New System.Drawing.Point(134, 124)
+ Me.txtMVMin.Name = "txtMVMin"
+ Me.txtMVMin.Size = New System.Drawing.Size(166, 20)
+ Me.txtMVMin.TabIndex = 14
+ '
+ 'txtMVMid
+ '
+ Me.txtMVMid.Location = New System.Drawing.Point(134, 149)
+ Me.txtMVMid.Name = "txtMVMid"
+ Me.txtMVMid.Size = New System.Drawing.Size(166, 20)
+ Me.txtMVMid.TabIndex = 15
+ '
+ 'txtMVMax
+ '
+ Me.txtMVMax.Location = New System.Drawing.Point(134, 176)
+ Me.txtMVMax.Name = "txtMVMax"
+ Me.txtMVMax.Size = New System.Drawing.Size(166, 20)
+ Me.txtMVMax.TabIndex = 16
+ '
+ 'txtCUPSMin
+ '
+ Me.txtCUPSMin.Location = New System.Drawing.Point(134, 202)
+ Me.txtCUPSMin.Name = "txtCUPSMin"
+ Me.txtCUPSMin.Size = New System.Drawing.Size(166, 20)
+ Me.txtCUPSMin.TabIndex = 17
+ '
+ 'txtCUPSMid
+ '
+ Me.txtCUPSMid.Location = New System.Drawing.Point(134, 226)
+ Me.txtCUPSMid.Name = "txtCUPSMid"
+ Me.txtCUPSMid.Size = New System.Drawing.Size(166, 20)
+ Me.txtCUPSMid.TabIndex = 18
+ '
+ 'txtCUPSMax
+ '
+ Me.txtCUPSMax.Location = New System.Drawing.Point(134, 252)
+ Me.txtCUPSMax.Name = "txtCUPSMax"
+ Me.txtCUPSMax.Size = New System.Drawing.Size(166, 20)
+ Me.txtCUPSMax.TabIndex = 19
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(31, 286)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(83, 23)
+ Me.btnAdd.TabIndex = 20
+ Me.btnAdd.Text = "Add && Finish"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(178, 286)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 21
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmConfig_Add_Wizard_Powder
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(318, 321)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtCUPSMax)
+ Me.Controls.Add(Me.txtCUPSMid)
+ Me.Controls.Add(Me.txtCUPSMin)
+ Me.Controls.Add(Me.txtMVMax)
+ Me.Controls.Add(Me.txtMVMid)
+ Me.Controls.Add(Me.txtMVMin)
+ Me.Controls.Add(Me.txtLMax)
+ Me.Controls.Add(Me.txtLMid)
+ Me.Controls.Add(Me.txtLMin)
+ Me.Controls.Add(Me.cmbPowder)
+ Me.Controls.Add(Me.Label10)
+ Me.Controls.Add(Me.Label9)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizardPowder"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Add Configuration - Powder Details"
+ CType(Me.GeneralPowderBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents cmbPowder As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents GeneralPowderBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_PowderTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PowderTableAdapter
- Friend WithEvents txtLMin As System.Windows.Forms.TextBox
- Friend WithEvents txtLMid As System.Windows.Forms.TextBox
- Friend WithEvents txtLMax As System.Windows.Forms.TextBox
- Friend WithEvents txtMVMin As System.Windows.Forms.TextBox
- Friend WithEvents txtMVMid As System.Windows.Forms.TextBox
- Friend WithEvents txtMVMax As System.Windows.Forms.TextBox
- Friend WithEvents txtCUPSMin As System.Windows.Forms.TextBox
- Friend WithEvents txtCUPSMid As System.Windows.Forms.TextBox
- Friend WithEvents txtCUPSMax As System.Windows.Forms.TextBox
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents Label9 As System.Windows.Forms.Label
+ Friend WithEvents Label10 As System.Windows.Forms.Label
+ Friend WithEvents cmbPowder As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents GeneralPowderBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_PowderTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PowderTableAdapter
+ Friend WithEvents txtLMin As System.Windows.Forms.TextBox
+ Friend WithEvents txtLMid As System.Windows.Forms.TextBox
+ Friend WithEvents txtLMax As System.Windows.Forms.TextBox
+ Friend WithEvents txtMVMin As System.Windows.Forms.TextBox
+ Friend WithEvents txtMVMid As System.Windows.Forms.TextBox
+ Friend WithEvents txtMVMax As System.Windows.Forms.TextBox
+ Friend WithEvents txtCUPSMin As System.Windows.Forms.TextBox
+ Friend WithEvents txtCUPSMid As System.Windows.Forms.TextBox
+ Friend WithEvents txtCUPSMax As System.Windows.Forms.TextBox
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.vb
index 347067b..c682ab2 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_Powder.vb
@@ -1,69 +1,117 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Helpers
-Public Class frmConfig_Add_Wizard_Powder
- Public ConfigName As String
- Public ConfigID As Long
- Public FromConfigWiz As Boolean
- Private Sub frmConfig_Add_Wizard_Powder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.General_PowderTableAdapter.Fill(Me.MLLDataSet.General_Powder)
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Function HasPerfPowder(ByVal lngID As Long) As Boolean
- Dim bAns As Boolean = False
- Try
- Dim Obj As New BSDatabase
- Dim SQL As String = "SELECT * from Config_List_Powder_Data_NSG where CLNID=" & _
- lngID & " and IsPref=1"
- Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- bAns = RS.HasRows
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "HasPerfPowder", Err.Number, ex.Message.ToString)
- End Try
- Return bAns
- End Function
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim lngPowderID As Long = cmbPowder.SelectedValue
- Dim LMin As Double = GeneralHelpers.FluffContent(txtLMin.Text, 0)
- Dim LMid As Double = GeneralHelpers.FluffContent(txtLMid.Text, 0)
- Dim LMax As Double = GeneralHelpers.FluffContent(txtLMax.Text, 0)
- Dim MVMin As Double = GeneralHelpers.FluffContent(txtMVMin.Text, 0)
- Dim MVMid As Double = GeneralHelpers.FluffContent(txtMVMid.Text, 0)
- Dim MVMax As Double = GeneralHelpers.FluffContent(txtMVMax.Text, 0)
- Dim CUPSMin As Double = GeneralHelpers.FluffContent(txtCUPSMin.Text, 0)
- Dim CUPSMid As Double = GeneralHelpers.FluffContent(txtCUPSMid.Text, 0)
- Dim CUPSMax As Double = GeneralHelpers.FluffContent(txtCUPSMax.Text, 0)
- Dim intPerf As Integer = 0
- If Not HasPerfPowder(ConfigID) Then intPerf = 1
- If Not GeneralHelpers.IsRequired(LMid, 0, "Mid Load/Preferred Load", Me.Text) Then Exit Sub
- Dim Obj As New BSDatabase
- Dim SQL As String = "INSERT INTO Config_List_Powder_Data_NSG(CLNID,PID," & _
- "Load_Min,Load_Mid,Load_Max,FPS_Min,FPS_MID,FPS_Max," & _
- "CUPS_Min,CUPS_Mid,CUPS_Max,IsPref) VALUES (" & ConfigID & "," & _
- lngPowderID & "," & LMin & "," & LMid & "," & LMax & "," & _
- MVMin & "," & MVMid & "," & MVMax & "," & CUPSMin & "," & _
- CUPSMid & "," & CUPSMax & "," & intPerf & ")"
- Obj.ConnExec(SQL)
- If FromConfigWiz Then Call MDIParentMain.RefreshConfigData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+Namespace Adding
+ ' TODO #20 Code Clean Up
+ '''
+ ''' Class frmConfig_Add_Wizard_Powder.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmConfigAddWizardPowder
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' From configuration wiz
+ '''
+ Public FromConfigWiz As Boolean
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_Powder control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmConfig_Add_Wizard_Powder_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ General_PowderTableAdapter.Fill(MLLDataSet.General_Powder)
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
-End Class
\ No newline at end of file
+ '
+ 'Private Function HasPerfPowder(ByVal lngID As Long) As Boolean
+ ' Dim bAns As Boolean = False
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Dim SQL As String = "SELECT * from Config_List_Powder_Data_NSG where CLNID=" & _
+ ' lngID & " and IsPref=1"
+ ' Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' bAns = RS.HasRows
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Obj.CloseDB()
+ ' Catch ex As Exception
+ ' Call LogError(Name, "HasPerfPowder", Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return bAns
+ 'End Function
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim powderId As Long = cmbPowder.SelectedValue
+ Dim loadMin As Double = GeneralHelpers.FluffContent(txtLMin.Text, 0)
+ Dim loadMid As Double = GeneralHelpers.FluffContent(txtLMid.Text, 0)
+ Dim loadMax As Double = GeneralHelpers.FluffContent(txtLMax.Text, 0)
+ Dim fpsMin As Double = GeneralHelpers.FluffContent(txtMVMin.Text, 0)
+ Dim fpsMid As Double = GeneralHelpers.FluffContent(txtMVMid.Text, 0)
+ Dim fpsMax As Double = GeneralHelpers.FluffContent(txtMVMax.Text, 0)
+ Dim cupsMin As Double = GeneralHelpers.FluffContent(txtCUPSMin.Text, 0)
+ Dim cupsMid As Double = GeneralHelpers.FluffContent(txtCUPSMid.Text, 0)
+ Dim cupsMax As Double = GeneralHelpers.FluffContent(txtCUPSMax.Text, 0)
+
+ If Not GeneralHelpers.IsRequired(loadMid, 0, "Mid Load/Preferred Load", Text) Then Exit Sub
+
+ Dim setAsDefault As Boolean = False
+ ' TODO: #19 UnComment Code when you update is applied
+ 'If Not ConfigListDataPowder.HasDefaultPowder(DatabasePath, ConfigId, _errOut) Then setAsDefault = True
+ if _errOut.Length > 0 then Throw new Exception(_errOut)
+ If Not ConfigListDataPowder.Add(DatabasePath, ConfigId, powderId, loadMin,
+ loadMid, loadMax, fpsMin, fpsMid, fpsMax, cupsMin,
+ cupsMid, cupsMax, setAsDefault, _errOut) then Throw new Exception(_errOut)
+ 'Dim intPerf As Integer = 0
+ 'If Not HasPerfPowder(ConfigId) Then intPerf = 1
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "INSERT INTO Config_List_Powder_Data_NSG(CLNID,PID," & _
+ ' "Load_Min,Load_Mid,Load_Max,FPS_Min,FPS_MID,FPS_Max," & _
+ ' "CUPS_Min,CUPS_Mid,CUPS_Max,IsPref) VALUES (" & ConfigId & "," & _
+ ' powderId & "," & loadMin & "," & loadMid & "," & loadMax & "," & _
+ ' fpsMin & "," & fpsMid & "," & fpsMax & "," & cupsMin & "," & _
+ ' cupsMid & "," & cupsMax & "," & intPerf & ")"
+ 'Obj.ConnExec(SQL)
+ If FromConfigWiz Then Call MdiParentMain.RefreshConfigData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+
+ End Class
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.Designer.vb
index 1833fb8..dc5b968 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.Designer.vb
@@ -1,313 +1,315 @@
- _
-Partial Class frmConfig_Add_Wizard_RP_1
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizardRp1
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- MyBase.Dispose(disposing)
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard_RP_1))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.cmbBullet = New System.Windows.Forms.ComboBox
- Me.ListBulletsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.cmbPrimer = New System.Windows.Forms.ComboBox
- Me.GeneralPrimerBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.cmbCase = New System.Windows.Forms.ComboBox
- Me.ListCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.chkPersonal = New System.Windows.Forms.CheckBox
- Me.chkBook = New System.Windows.Forms.CheckBox
- Me.txtLoad = New System.Windows.Forms.TextBox
- Me.List_BulletsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_BulletsTableAdapter
- Me.General_PrimerTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
- Me.List_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CaseTableAdapter
- Me.btnAdd = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.cmbAmmo = New System.Windows.Forms.ComboBox
- Me.GeneralAmmunitionTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.Label6 = New System.Windows.Forms.Label
- Me.General_Ammunition_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Ammunition_TypeTableAdapter
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.ListBulletsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.GeneralAmmunitionTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 39)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(36, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Bullet:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 66)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(39, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Primer:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 93)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(34, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Case:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 145)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(71, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Load Source:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(11, 119)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(61, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Load Type:"
- '
- 'cmbBullet
- '
- Me.cmbBullet.DataSource = Me.ListBulletsBindingSource
- Me.cmbBullet.DisplayMember = "Name"
- Me.cmbBullet.FormattingEnabled = True
- Me.cmbBullet.Location = New System.Drawing.Point(103, 36)
- Me.cmbBullet.Name = "cmbBullet"
- Me.cmbBullet.Size = New System.Drawing.Size(172, 21)
- Me.cmbBullet.TabIndex = 5
- Me.cmbBullet.ValueMember = "ID"
- '
- 'ListBulletsBindingSource
- '
- Me.ListBulletsBindingSource.DataMember = "List_Bullets"
- Me.ListBulletsBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'cmbPrimer
- '
- Me.cmbPrimer.DataSource = Me.GeneralPrimerBindingSource
- Me.cmbPrimer.DisplayMember = "Name"
- Me.cmbPrimer.FormattingEnabled = True
- Me.cmbPrimer.Location = New System.Drawing.Point(103, 63)
- Me.cmbPrimer.Name = "cmbPrimer"
- Me.cmbPrimer.Size = New System.Drawing.Size(172, 21)
- Me.cmbPrimer.TabIndex = 6
- Me.cmbPrimer.ValueMember = "ID"
- '
- 'GeneralPrimerBindingSource
- '
- Me.GeneralPrimerBindingSource.DataMember = "General_Primer"
- Me.GeneralPrimerBindingSource.DataSource = Me.MLLDataSet
- '
- 'cmbCase
- '
- Me.cmbCase.DataSource = Me.ListCaseBindingSource
- Me.cmbCase.DisplayMember = "Name"
- Me.cmbCase.FormattingEnabled = True
- Me.cmbCase.Location = New System.Drawing.Point(103, 90)
- Me.cmbCase.Name = "cmbCase"
- Me.cmbCase.Size = New System.Drawing.Size(172, 21)
- Me.cmbCase.TabIndex = 7
- Me.cmbCase.ValueMember = "ID"
- '
- 'ListCaseBindingSource
- '
- Me.ListCaseBindingSource.DataMember = "List_Case"
- Me.ListCaseBindingSource.DataSource = Me.MLLDataSet
- '
- 'chkPersonal
- '
- Me.chkPersonal.AutoSize = True
- Me.chkPersonal.Location = New System.Drawing.Point(103, 118)
- Me.chkPersonal.Name = "chkPersonal"
- Me.chkPersonal.Size = New System.Drawing.Size(67, 17)
- Me.chkPersonal.TabIndex = 8
- Me.chkPersonal.Text = "Personal"
- Me.chkPersonal.UseVisualStyleBackColor = True
- '
- 'chkBook
- '
- Me.chkBook.AutoSize = True
- Me.chkBook.Location = New System.Drawing.Point(188, 118)
- Me.chkBook.Name = "chkBook"
- Me.chkBook.Size = New System.Drawing.Size(86, 17)
- Me.chkBook.TabIndex = 9
- Me.chkBook.Text = "From a Book"
- Me.chkBook.UseVisualStyleBackColor = True
- '
- 'txtLoad
- '
- Me.txtLoad.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtLoad.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtLoad.Location = New System.Drawing.Point(103, 142)
- Me.txtLoad.Name = "txtLoad"
- Me.txtLoad.Size = New System.Drawing.Size(171, 20)
- Me.txtLoad.TabIndex = 10
- '
- 'List_BulletsTableAdapter
- '
- Me.List_BulletsTableAdapter.ClearBeforeFill = True
- '
- 'General_PrimerTableAdapter
- '
- Me.General_PrimerTableAdapter.ClearBeforeFill = True
- '
- 'List_CaseTableAdapter
- '
- Me.List_CaseTableAdapter.ClearBeforeFill = True
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(44, 180)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 11
- Me.btnAdd.Text = "Add"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(188, 180)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 12
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'cmbAmmo
- '
- Me.cmbAmmo.DataSource = Me.GeneralAmmunitionTypeBindingSource
- Me.cmbAmmo.DisplayMember = "FType"
- Me.cmbAmmo.FormattingEnabled = True
- Me.cmbAmmo.Location = New System.Drawing.Point(103, 9)
- Me.cmbAmmo.Name = "cmbAmmo"
- Me.cmbAmmo.Size = New System.Drawing.Size(171, 21)
- Me.cmbAmmo.TabIndex = 13
- Me.cmbAmmo.ValueMember = "ID"
- '
- 'GeneralAmmunitionTypeBindingSource
- '
- Me.GeneralAmmunitionTypeBindingSource.DataMember = "General_Ammunition_Type"
- Me.GeneralAmmunitionTypeBindingSource.DataSource = Me.MLLDataSet
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 12)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(66, 13)
- Me.Label6.TabIndex = 14
- Me.Label6.Text = "Ammo Type:"
- '
- 'General_Ammunition_TypeTableAdapter
- '
- Me.General_Ammunition_TypeTableAdapter.ClearBeforeFill = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmConfig_Add_Wizard_RP_1
- '
- Me.AcceptButton = Me.btnAdd
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(291, 214)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.cmbAmmo)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.txtLoad)
- Me.Controls.Add(Me.chkBook)
- Me.Controls.Add(Me.chkPersonal)
- Me.Controls.Add(Me.cmbCase)
- Me.Controls.Add(Me.cmbPrimer)
- Me.Controls.Add(Me.cmbBullet)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard_RP_1"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Add Configuration for Pistols and Rifles"
- CType(Me.ListBulletsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.GeneralAmmunitionTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizardRp1))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.cmbBullet = New System.Windows.Forms.ComboBox
+ Me.ListBulletsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.cmbPrimer = New System.Windows.Forms.ComboBox
+ Me.GeneralPrimerBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.cmbCase = New System.Windows.Forms.ComboBox
+ Me.ListCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.chkPersonal = New System.Windows.Forms.CheckBox
+ Me.chkBook = New System.Windows.Forms.CheckBox
+ Me.txtLoad = New System.Windows.Forms.TextBox
+ Me.List_BulletsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_BulletsTableAdapter
+ Me.General_PrimerTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
+ Me.List_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_CaseTableAdapter
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.cmbAmmo = New System.Windows.Forms.ComboBox
+ Me.GeneralAmmunitionTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.General_Ammunition_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Ammunition_TypeTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.ListBulletsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GeneralAmmunitionTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 39)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(36, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Bullet:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 66)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(39, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Primer:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 93)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(34, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Case:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 145)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(71, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Load Source:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(11, 119)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(61, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Load Type:"
+ '
+ 'cmbBullet
+ '
+ Me.cmbBullet.DataSource = Me.ListBulletsBindingSource
+ Me.cmbBullet.DisplayMember = "Name"
+ Me.cmbBullet.FormattingEnabled = True
+ Me.cmbBullet.Location = New System.Drawing.Point(103, 36)
+ Me.cmbBullet.Name = "cmbBullet"
+ Me.cmbBullet.Size = New System.Drawing.Size(172, 21)
+ Me.cmbBullet.TabIndex = 5
+ Me.cmbBullet.ValueMember = "ID"
+ '
+ 'ListBulletsBindingSource
+ '
+ Me.ListBulletsBindingSource.DataMember = "List_Bullets"
+ Me.ListBulletsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'cmbPrimer
+ '
+ Me.cmbPrimer.DataSource = Me.GeneralPrimerBindingSource
+ Me.cmbPrimer.DisplayMember = "Name"
+ Me.cmbPrimer.FormattingEnabled = True
+ Me.cmbPrimer.Location = New System.Drawing.Point(103, 63)
+ Me.cmbPrimer.Name = "cmbPrimer"
+ Me.cmbPrimer.Size = New System.Drawing.Size(172, 21)
+ Me.cmbPrimer.TabIndex = 6
+ Me.cmbPrimer.ValueMember = "ID"
+ '
+ 'GeneralPrimerBindingSource
+ '
+ Me.GeneralPrimerBindingSource.DataMember = "General_Primer"
+ Me.GeneralPrimerBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'cmbCase
+ '
+ Me.cmbCase.DataSource = Me.ListCaseBindingSource
+ Me.cmbCase.DisplayMember = "Name"
+ Me.cmbCase.FormattingEnabled = True
+ Me.cmbCase.Location = New System.Drawing.Point(103, 90)
+ Me.cmbCase.Name = "cmbCase"
+ Me.cmbCase.Size = New System.Drawing.Size(172, 21)
+ Me.cmbCase.TabIndex = 7
+ Me.cmbCase.ValueMember = "ID"
+ '
+ 'ListCaseBindingSource
+ '
+ Me.ListCaseBindingSource.DataMember = "List_Case"
+ Me.ListCaseBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'chkPersonal
+ '
+ Me.chkPersonal.AutoSize = True
+ Me.chkPersonal.Location = New System.Drawing.Point(103, 118)
+ Me.chkPersonal.Name = "chkPersonal"
+ Me.chkPersonal.Size = New System.Drawing.Size(67, 17)
+ Me.chkPersonal.TabIndex = 8
+ Me.chkPersonal.Text = "Personal"
+ Me.chkPersonal.UseVisualStyleBackColor = True
+ '
+ 'chkBook
+ '
+ Me.chkBook.AutoSize = True
+ Me.chkBook.Location = New System.Drawing.Point(188, 118)
+ Me.chkBook.Name = "chkBook"
+ Me.chkBook.Size = New System.Drawing.Size(86, 17)
+ Me.chkBook.TabIndex = 9
+ Me.chkBook.Text = "From a Book"
+ Me.chkBook.UseVisualStyleBackColor = True
+ '
+ 'txtLoad
+ '
+ Me.txtLoad.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLoad.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLoad.Location = New System.Drawing.Point(103, 142)
+ Me.txtLoad.Name = "txtLoad"
+ Me.txtLoad.Size = New System.Drawing.Size(171, 20)
+ Me.txtLoad.TabIndex = 10
+ '
+ 'List_BulletsTableAdapter
+ '
+ Me.List_BulletsTableAdapter.ClearBeforeFill = True
+ '
+ 'General_PrimerTableAdapter
+ '
+ Me.General_PrimerTableAdapter.ClearBeforeFill = True
+ '
+ 'List_CaseTableAdapter
+ '
+ Me.List_CaseTableAdapter.ClearBeforeFill = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(44, 180)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 11
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(188, 180)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 12
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'cmbAmmo
+ '
+ Me.cmbAmmo.DataSource = Me.GeneralAmmunitionTypeBindingSource
+ Me.cmbAmmo.DisplayMember = "FType"
+ Me.cmbAmmo.FormattingEnabled = True
+ Me.cmbAmmo.Location = New System.Drawing.Point(103, 9)
+ Me.cmbAmmo.Name = "cmbAmmo"
+ Me.cmbAmmo.Size = New System.Drawing.Size(171, 21)
+ Me.cmbAmmo.TabIndex = 13
+ Me.cmbAmmo.ValueMember = "ID"
+ '
+ 'GeneralAmmunitionTypeBindingSource
+ '
+ Me.GeneralAmmunitionTypeBindingSource.DataMember = "General_Ammunition_Type"
+ Me.GeneralAmmunitionTypeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 12)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(66, 13)
+ Me.Label6.TabIndex = 14
+ Me.Label6.Text = "Ammo Type:"
+ '
+ 'General_Ammunition_TypeTableAdapter
+ '
+ Me.General_Ammunition_TypeTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmConfig_Add_Wizard_RP_1
+ '
+ Me.AcceptButton = Me.btnAdd
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(291, 214)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.cmbAmmo)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtLoad)
+ Me.Controls.Add(Me.chkBook)
+ Me.Controls.Add(Me.chkPersonal)
+ Me.Controls.Add(Me.cmbCase)
+ Me.Controls.Add(Me.cmbPrimer)
+ Me.Controls.Add(Me.cmbBullet)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Adding a New Configuration")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Adding a New Configuration")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizardRp1"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Add Configuration for Pistols and Rifles"
+ CType(Me.ListBulletsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GeneralAmmunitionTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents cmbBullet As System.Windows.Forms.ComboBox
- Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
- Friend WithEvents cmbCase As System.Windows.Forms.ComboBox
- Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
- Friend WithEvents chkBook As System.Windows.Forms.CheckBox
- Friend WithEvents txtLoad As System.Windows.Forms.TextBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListBulletsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_BulletsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_BulletsTableAdapter
- Friend WithEvents GeneralPrimerBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_PrimerTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
- Friend WithEvents ListCaseBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CaseTableAdapter
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents cmbAmmo As System.Windows.Forms.ComboBox
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents GeneralAmmunitionTypeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_Ammunition_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Ammunition_TypeTableAdapter
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents cmbBullet As System.Windows.Forms.ComboBox
+ Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
+ Friend WithEvents cmbCase As System.Windows.Forms.ComboBox
+ Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
+ Friend WithEvents chkBook As System.Windows.Forms.CheckBox
+ Friend WithEvents txtLoad As System.Windows.Forms.TextBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListBulletsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_BulletsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_BulletsTableAdapter
+ Friend WithEvents GeneralPrimerBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_PrimerTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
+ Friend WithEvents ListCaseBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_CaseTableAdapter
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents cmbAmmo As System.Windows.Forms.ComboBox
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents GeneralAmmunitionTypeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_Ammunition_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Ammunition_TypeTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.vb
index ecfb366..f1d86ba 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_RP_1.vb
@@ -1,75 +1,131 @@
-Imports BSMyLoadersLog.LoadersClass
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Helpers
-Public Class frmConfig_Add_Wizard_RP_1
- Public CalID As Long
- Public ConfigName As String
- Public ConfigID As Long
- Dim isPersonal As Boolean
- Private Sub frmConfig_Add_Wizard_RP_1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.General_Ammunition_TypeTableAdapter.Fill(Me.MLLDataSet.General_Ammunition_Type)
- isPersonal = True
- Me.List_CaseTableAdapter.FillBy_CALID(Me.MLLDataSet.List_Case, CalID)
- Me.General_PrimerTableAdapter.Fill(Me.MLLDataSet.General_Primer)
- Me.List_BulletsTableAdapter.FillBy_CALID(Me.MLLDataSet.List_Bullets, CalID)
- If isPersonal Then
+Namespace Adding
+ '''
+ ''' Class frmConfig_Add_Wizard_RP_1.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmConfigAddWizardRp1
+ ' TODO: #20 Code Cleanup
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' The cal identifier
+ '''
+ Public CaliberId As Long
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' The is personal
+ '''
+ Dim _isPersonal As Boolean
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_RP_1 control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub frmConfig_Add_Wizard_RP_1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ General_Ammunition_TypeTableAdapter.Fill(MLLDataSet.General_Ammunition_Type)
+ _isPersonal = True
+ List_CaseTableAdapter.FillBy_CALID(MLLDataSet.List_Case, CaliberId)
+ General_PrimerTableAdapter.Fill(MLLDataSet.General_Primer)
+ List_BulletsTableAdapter.FillBy_CALID(MLLDataSet.List_Bullets, CaliberId)
+ If _isPersonal Then
+ txtLoad.Enabled = False
+ chkPersonal.Checked = True
+ End If
+ 'Dim ObjAF As New AutoFillCollections
+ 'txtLoad.AutoCompleteCustomSource = ObjAF.Config_Source_NSG
+ txtLoad.AutoCompleteCustomSource = ConfigMetalic.Source(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkPersonal control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkPersonal_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkPersonal.CheckedChanged
+ If chkPersonal.Checked Then
txtLoad.Enabled = False
- chkPersonal.Checked = True
+ chkBook.Checked = False
End If
- Dim ObjAF As New AutoFillCollections
- txtLoad.AutoCompleteCustomSource = ObjAF.Config_Source_NSG
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-
- Private Sub chkPersonal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkPersonal.CheckedChanged
- If chkPersonal.Checked Then
- txtLoad.Enabled = False
- chkBook.Checked = False
- End If
- End Sub
-
- Private Sub chkBook_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkBook.CheckedChanged
- If chkBook.Checked Then
- txtLoad.Enabled = True
- chkPersonal.Checked = False
- End If
- End Sub
-
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Try
- Dim lngBullet As Long = cmbBullet.SelectedValue
- Dim lngPrimer As Long = cmbPrimer.SelectedValue
- Dim lngCase As Long = cmbCase.SelectedValue
- Dim lngAmmoType As Long = cmbAmmo.SelectedValue
- Dim bPersonal As Boolean = chkPersonal.Checked
- Dim bOther As Boolean = chkBook.Checked
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- Dim strSource As String = GeneralHelpers.FluffContent(txtLoad.Text)
- If bOther Then
- SQL = "UPDATE Config_List_Name set IsPersonal=0 where id=" & ConfigID
- Obj.ConnExec(SQL)
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkBook control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkBook_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkBook.CheckedChanged
+ If chkBook.Checked Then
+ txtLoad.Enabled = True
+ chkPersonal.Checked = False
End If
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Try
+ Dim lngBullet As Long = cmbBullet.SelectedValue
+ Dim lngPrimer As Long = cmbPrimer.SelectedValue
+ Dim lngCase As Long = cmbCase.SelectedValue
+ Dim lngAmmoType As Long = cmbAmmo.SelectedValue
+ 'Dim bPersonal As Boolean = chkPersonal.Checked
+ 'Dim bOther As Boolean = chkBook.Checked
+ 'Dim SQL As String = ""
+ 'Dim Obj As New BSDatabase
+ Dim strSource As String = GeneralHelpers.FluffContent(txtLoad.Text)
+ If chkBook.Checked Then
+ ' TODO: #19 Update when newer library is applied
+ 'If Not ConfigListDataName.SetPersonal(DatabasePath, ConfigID, false, _errOut) Then Throw New Exception(_errOut)
+ 'SQL = "UPDATE Config_List_Name set IsPersonal=0 where id=" & ConfigID
+ 'Obj.ConnExec(SQL)
+ End If
+
+ If Not ConfigListDataMetalic.Add(DatabasePath, ConfigId, lngAmmoType, CaliberId,
+ lngBullet, lngPrimer, lngCase, strSource,
+ _errOut) Then Throw New Exception(_errOut)
- SQL = "INSERT INTO Config_List_Data_NSG(CLNID,ATID,CALID,BID,PRID,CAID,Source) VALUES (" & _
- ConfigID & "," & lngAmmoType & "," & CalID & "," & lngBullet & "," & _
- lngPrimer & "," & lngCase & ",'" & strSource & "')"
- Obj.ConnExec(SQL)
- frmConfig_Add_Wizard_Powder.ConfigID = ConfigID
- frmConfig_Add_Wizard_Powder.ConfigName = ConfigName
- frmConfig_Add_Wizard_Powder.FromConfigWiz = True
- frmConfig_Add_Wizard_Powder.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_Powder.Show()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ 'SQL = "INSERT INTO Config_List_Data_NSG(CLNID,ATID,CALID,BID,PRID,CAID,Source) VALUES (" & _
+ ' ConfigID & "," & lngAmmoType & "," & CalID & "," & lngBullet & "," & _
+ ' lngPrimer & "," & lngCase & ",'" & strSource & "')"
+ 'Obj.ConnExec(SQL)
+ FrmConfigAddWizardPowder.ConfigId = ConfigId
+ FrmConfigAddWizardPowder.ConfigName = ConfigName
+ FrmConfigAddWizardPowder.FromConfigWiz = True
+ FrmConfigAddWizardPowder.MdiParent = MdiParent
+ FrmConfigAddWizardPowder.Show()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.Designer.vb
index 7140b8a..91ea841 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.Designer.vb
@@ -1,107 +1,109 @@
- _
-Partial Class frmConfig_Add_Wizard_SG_1
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizardSg1
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard_SG_1))
- Me.chkShot = New System.Windows.Forms.CheckBox
- Me.chkSlug = New System.Windows.Forms.CheckBox
- Me.Label1 = New System.Windows.Forms.Label
- Me.btnCon = New System.Windows.Forms.Button
- Me.btnCancel = New System.Windows.Forms.Button
- Me.SuspendLayout()
- '
- 'chkShot
- '
- Me.chkShot.AutoSize = True
- Me.chkShot.Location = New System.Drawing.Point(16, 55)
- Me.chkShot.Name = "chkShot"
- Me.chkShot.Size = New System.Drawing.Size(187, 17)
- Me.chkShot.TabIndex = 0
- Me.chkShot.Text = "Shot (#9,8,7,6,5,4,3,0,00,000,etc)"
- Me.chkShot.UseVisualStyleBackColor = True
- '
- 'chkSlug
- '
- Me.chkSlug.AutoSize = True
- Me.chkSlug.Location = New System.Drawing.Point(16, 78)
- Me.chkSlug.Name = "chkSlug"
- Me.chkSlug.Size = New System.Drawing.Size(86, 17)
- Me.chkSlug.TabIndex = 1
- Me.chkSlug.Text = "Slug/Sabbot"
- Me.chkSlug.UseVisualStyleBackColor = True
- '
- 'Label1
- '
- Me.Label1.Location = New System.Drawing.Point(13, 13)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(240, 28)
- Me.Label1.TabIndex = 2
- Me.Label1.Text = "Please select the type of shotgun ammunition that you want to build."
- '
- 'btnCon
- '
- Me.btnCon.Location = New System.Drawing.Point(16, 110)
- Me.btnCon.Name = "btnCon"
- Me.btnCon.Size = New System.Drawing.Size(75, 23)
- Me.btnCon.TabIndex = 3
- Me.btnCon.Text = "&Continue"
- Me.btnCon.UseVisualStyleBackColor = True
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(159, 110)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 4
- Me.btnCancel.Text = "&Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'frmConfig_Add_Wizard_SG_1
- '
- Me.AcceptButton = Me.btnCon
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.btnCancel
- Me.ClientSize = New System.Drawing.Size(257, 144)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnCon)
- Me.Controls.Add(Me.Label1)
- Me.Controls.Add(Me.chkSlug)
- Me.Controls.Add(Me.chkShot)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard_SG_1"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Select Shotgun Ammunition Type"
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizardSg1))
+ Me.chkShot = New System.Windows.Forms.CheckBox
+ Me.chkSlug = New System.Windows.Forms.CheckBox
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.btnCon = New System.Windows.Forms.Button
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.SuspendLayout()
+ '
+ 'chkShot
+ '
+ Me.chkShot.AutoSize = True
+ Me.chkShot.Location = New System.Drawing.Point(16, 55)
+ Me.chkShot.Name = "chkShot"
+ Me.chkShot.Size = New System.Drawing.Size(187, 17)
+ Me.chkShot.TabIndex = 0
+ Me.chkShot.Text = "Shot (#9,8,7,6,5,4,3,0,00,000,etc)"
+ Me.chkShot.UseVisualStyleBackColor = True
+ '
+ 'chkSlug
+ '
+ Me.chkSlug.AutoSize = True
+ Me.chkSlug.Location = New System.Drawing.Point(16, 78)
+ Me.chkSlug.Name = "chkSlug"
+ Me.chkSlug.Size = New System.Drawing.Size(86, 17)
+ Me.chkSlug.TabIndex = 1
+ Me.chkSlug.Text = "Slug/Sabbot"
+ Me.chkSlug.UseVisualStyleBackColor = True
+ '
+ 'Label1
+ '
+ Me.Label1.Location = New System.Drawing.Point(13, 13)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(240, 28)
+ Me.Label1.TabIndex = 2
+ Me.Label1.Text = "Please select the type of shotgun ammunition that you want to build."
+ '
+ 'btnCon
+ '
+ Me.btnCon.Location = New System.Drawing.Point(16, 110)
+ Me.btnCon.Name = "btnCon"
+ Me.btnCon.Size = New System.Drawing.Size(75, 23)
+ Me.btnCon.TabIndex = 3
+ Me.btnCon.Text = "&Continue"
+ Me.btnCon.UseVisualStyleBackColor = True
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(159, 110)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 4
+ Me.btnCancel.Text = "&Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'frmConfig_Add_Wizard_SG_1
+ '
+ Me.AcceptButton = Me.btnCon
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.btnCancel
+ Me.ClientSize = New System.Drawing.Size(257, 144)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnCon)
+ Me.Controls.Add(Me.Label1)
+ Me.Controls.Add(Me.chkSlug)
+ Me.Controls.Add(Me.chkShot)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizardSg1"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Select Shotgun Ammunition Type"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents chkShot As System.Windows.Forms.CheckBox
- Friend WithEvents chkSlug As System.Windows.Forms.CheckBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents btnCon As System.Windows.Forms.Button
- Friend WithEvents btnCancel As System.Windows.Forms.Button
-End Class
+ End Sub
+ Friend WithEvents chkShot As System.Windows.Forms.CheckBox
+ Friend WithEvents chkSlug As System.Windows.Forms.CheckBox
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents btnCon As System.Windows.Forms.Button
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.vb
index 8e8518c..30cc0e3 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_1.vb
@@ -1,82 +1,136 @@
-Imports System.Data
-Imports System.Data.Odbc
-Imports BSMyLoadersLog.LoadersClass
-Public Class frmConfig_Add_Wizard_SG_1
- Public ConfigName As String
- Public CalID As Long
- Public CalName As String
- Public ConfigID As Long
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
- Private Sub btnCon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCon.Click
- Try
- Dim bShot As Boolean = chkShot.Checked
- Dim bSlug As Boolean = chkSlug.Checked
- If bShot Then
- frmConfig_Add_Wizard_SG_2.ConfigID = ConfigID
- frmConfig_Add_Wizard_SG_2.CalID = CalID
- frmConfig_Add_Wizard_SG_2.CalName = CalName
- frmConfig_Add_Wizard_SG_2.GID = GenerateGaugeID(CalName)
- frmConfig_Add_Wizard_SG_2.ConfigName = ConfigName
- frmConfig_Add_Wizard_SG_2.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_SG_2.Show()
- Me.Close()
- End If
- If bSlug Then
- frmConfig_Add_Wizard_SG_3.ConfigID = ConfigID
- frmConfig_Add_Wizard_SG_3.CalID = CalID
- frmConfig_Add_Wizard_SG_3.CalName = CalName
- frmConfig_Add_Wizard_SG_3.GID = GenerateGaugeID(CalName)
- frmConfig_Add_Wizard_SG_3.ConfigName = ConfigName
- frmConfig_Add_Wizard_SG_3.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_SG_3.Show()
- Me.Close()
- End If
- Catch ex As Exception
- Call LogError(Me.Name, "btnCon_Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Function GenerateGaugeID(ByVal sCalName As String) As Long
- Dim lAns As Long = 0
- Dim Obj As New BSDatabase
- lAns = GetGaugeID(sCalName)
- If lAns = 0 Then
- Obj.ConnExec("INSERT INTO List_SG_Gauge(ga) VALUES('" & sCalName & "')")
- lAns = GetGaugeID(sCalName)
- End If
- Return lAns
- End Function
- Function GetGaugeID(ByVal sCalName As String) As Long
- Dim lAns As Long = 0
- Try
- Dim SQL As String = "SELECT ID from List_SG_Gauge where ga='" & sCalName & "'"
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- lAns = RS("ID")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "GetGaugeID", Err.Number, ex.Message.ToString)
- End Try
- Return lAns
- End Function
- Private Sub chkShot_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkShot.CheckedChanged
- If chkShot.Checked Then chkSlug.Checked = False
- End Sub
+'Imports System.Data
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.Inventory
- Private Sub chkSlug_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkSlug.CheckedChanged
- If chkSlug.Checked Then chkShot.Checked = False
- End Sub
+Namespace Adding
+ '''
+ ''' Class frmConfig_Add_Wizard_SG_1.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmConfigAddWizardSg1
+ ' TODO: #20 Code Cleanup
+ '''
+ ''' The error out
+ '''
+ Dim _errOut as String
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The cal identifier
+ '''
+ Public CaliberId As Long
+ '''
+ ''' The cal name
+ '''
+ Public CaliberName As String
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCon control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCon_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCon.Click
+ Try
+ Dim bShot As Boolean = chkShot.Checked
+ Dim bSlug As Boolean = chkSlug.Checked
+ Dim gaugeId as Long = ShotgunGauges.GenerateGaugeId(DatabasePath, CaliberName, _errOut)
+ If _errOut.Length > 0 then Throw New Exception(_errOut)
- Private Sub frmConfig_Add_Wizard_SG_1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
+ If bShot Then
+ FrmConfigAddWizardSg2.ConfigId = ConfigId
+ FrmConfigAddWizardSg2.CaliberId = CaliberId
+ FrmConfigAddWizardSg2.CaliberName = CaliberName
+ FrmConfigAddWizardSg2.GaugeId = gaugeId
+ FrmConfigAddWizardSg2.ConfigName = ConfigName
+ FrmConfigAddWizardSg2.MdiParent = MdiParent
+ FrmConfigAddWizardSg2.Show()
+ Close()
+ End If
+ If bSlug Then
+ FrmConfigAddWizardSg3.ConfigId = ConfigId
+ FrmConfigAddWizardSg3.CaliberId = CaliberId
+ FrmConfigAddWizardSg3.CaliberName = CaliberName
+ FrmConfigAddWizardSg3.GaugeId = gaugeId
+ FrmConfigAddWizardSg3.ConfigName = ConfigName
+ FrmConfigAddWizardSg3.MdiParent = MdiParent
+ FrmConfigAddWizardSg3.Show()
+ Close()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "btnCon_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+
+ 'Function GenerateGaugeId(ByVal sCalName As String) As Long
+ ' Dim lAns As Long = 0
+ ' Dim obj As New BSDatabase
+ ' lAns = GetGaugeId(sCalName)
+ ' If lAns = 0 Then
+ ' obj.ConnExec("INSERT INTO List_SG_Gauge(ga) VALUES('" & sCalName & "')")
+ ' lAns = GetGaugeId(sCalName)
+ ' End If
+ ' Return lAns
+ 'End Function
+
+ 'Function GetGaugeId(ByVal sCalName As String) As Long
+ ' Dim lAns As Long = 0
+ ' Try
+ ' Dim sql As String = "SELECT ID from List_SG_Gauge where ga='" & sCalName & "'"
+ ' Dim obj As New BSDatabase
+ ' Call obj.ConnectDB()
+ ' Dim cmd As New OdbcCommand(sql, obj.Conn)
+ ' Dim rs As OdbcDataReader
+ ' rs = cmd.ExecuteReader
+ ' While rs.Read
+ ' lAns = rs("ID")
+ ' End While
+ ' rs.Close()
+ ' rs = Nothing
+ ' cmd = Nothing
+ ' obj.CloseDB()
+ ' Catch ex As Exception
+ ' Call LogError(Name, "GetGaugeID", Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return lAns
+ 'End Function
+ '''
+ ''' Handles the CheckedChanged event of the chkShot control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkShot_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkShot.CheckedChanged
+ If chkShot.Checked Then chkSlug.Checked = False
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkSlug control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkSlug_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkSlug.CheckedChanged
+ If chkSlug.Checked Then chkShot.Checked = False
+ End Sub
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_SG_1 control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmConfig_Add_Wizard_SG_1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
- End Sub
-End Class
\ No newline at end of file
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.Designer.vb
index eed2e10..b09adca 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.Designer.vb
@@ -1,359 +1,361 @@
- _
-Partial Class frmConfig_Add_Wizard_SG_2
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizardSg2
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard_SG_2))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.cmbPrimer = New System.Windows.Forms.ComboBox
- Me.ViewPrimerListBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.cmdWAD = New System.Windows.Forms.ComboBox
- Me.ListSGWADBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.cmdHull = New System.Windows.Forms.ComboBox
- Me.ListSGCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.cmdShotType = New System.Windows.Forms.ComboBox
- Me.ListSGShotTypeDetailsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.ViewPrimerListTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
- Me.List_SG_WADTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
- Me.List_SG_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
- Me.List_SG_ShotType_DetailsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtShotCharge = New System.Windows.Forms.TextBox
- Me.Label6 = New System.Windows.Forms.Label
- Me.cmbLoadType = New System.Windows.Forms.ComboBox
- Me.ListSGShotChargeLoadsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.List_SG_ShotCharge_LoadsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
- Me.Label7 = New System.Windows.Forms.Label
- Me.btnNext = New System.Windows.Forms.Button
- Me.txtSource = New System.Windows.Forms.TextBox
- Me.Label8 = New System.Windows.Forms.Label
- Me.Label9 = New System.Windows.Forms.Label
- Me.chkPersonal = New System.Windows.Forms.CheckBox
- CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(13, 73)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(39, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Primer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(13, 98)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(28, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Hull:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(13, 125)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(36, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "WAD:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(13, 152)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(59, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Shot Type:"
- '
- 'cmbPrimer
- '
- Me.cmbPrimer.DataSource = Me.ViewPrimerListBindingSource
- Me.cmbPrimer.DisplayMember = "PrimerName"
- Me.cmbPrimer.FormattingEnabled = True
- Me.cmbPrimer.Location = New System.Drawing.Point(110, 70)
- Me.cmbPrimer.Name = "cmbPrimer"
- Me.cmbPrimer.Size = New System.Drawing.Size(235, 21)
- Me.cmbPrimer.TabIndex = 4
- Me.cmbPrimer.ValueMember = "ID"
- '
- 'ViewPrimerListBindingSource
- '
- Me.ViewPrimerListBindingSource.DataMember = "viewPrimerList"
- Me.ViewPrimerListBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'cmdWAD
- '
- Me.cmdWAD.DataSource = Me.ListSGWADBindingSource
- Me.cmdWAD.DisplayMember = "WAD"
- Me.cmdWAD.FormattingEnabled = True
- Me.cmdWAD.Location = New System.Drawing.Point(110, 122)
- Me.cmdWAD.Name = "cmdWAD"
- Me.cmdWAD.Size = New System.Drawing.Size(235, 21)
- Me.cmdWAD.TabIndex = 5
- Me.cmdWAD.ValueMember = "ID"
- '
- 'ListSGWADBindingSource
- '
- Me.ListSGWADBindingSource.DataMember = "List_SG_WAD"
- Me.ListSGWADBindingSource.DataSource = Me.MLLDataSet
- '
- 'cmdHull
- '
- Me.cmdHull.DataSource = Me.ListSGCaseBindingSource
- Me.cmdHull.DisplayMember = "Name"
- Me.cmdHull.FormattingEnabled = True
- Me.cmdHull.Location = New System.Drawing.Point(110, 95)
- Me.cmdHull.Name = "cmdHull"
- Me.cmdHull.Size = New System.Drawing.Size(235, 21)
- Me.cmdHull.TabIndex = 6
- Me.cmdHull.ValueMember = "ID"
- '
- 'ListSGCaseBindingSource
- '
- Me.ListSGCaseBindingSource.DataMember = "List_SG_Case"
- Me.ListSGCaseBindingSource.DataSource = Me.MLLDataSet
- '
- 'cmdShotType
- '
- Me.cmdShotType.DataSource = Me.ListSGShotTypeDetailsBindingSource
- Me.cmdShotType.DisplayMember = "Name"
- Me.cmdShotType.FormattingEnabled = True
- Me.cmdShotType.Location = New System.Drawing.Point(110, 149)
- Me.cmdShotType.Name = "cmdShotType"
- Me.cmdShotType.Size = New System.Drawing.Size(235, 21)
- Me.cmdShotType.TabIndex = 7
- Me.cmdShotType.ValueMember = "ID"
- '
- 'ListSGShotTypeDetailsBindingSource
- '
- Me.ListSGShotTypeDetailsBindingSource.DataMember = "List_SG_ShotType_Details"
- Me.ListSGShotTypeDetailsBindingSource.DataSource = Me.MLLDataSet
- '
- 'ViewPrimerListTableAdapter
- '
- Me.ViewPrimerListTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_WADTableAdapter
- '
- Me.List_SG_WADTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_CaseTableAdapter
- '
- Me.List_SG_CaseTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_ShotType_DetailsTableAdapter
- '
- Me.List_SG_ShotType_DetailsTableAdapter.ClearBeforeFill = True
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 179)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(89, 13)
- Me.Label5.TabIndex = 8
- Me.Label5.Text = "Shot Charge (oz):"
- '
- 'txtShotCharge
- '
- Me.txtShotCharge.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtShotCharge.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtShotCharge.Location = New System.Drawing.Point(110, 176)
- Me.txtShotCharge.Name = "txtShotCharge"
- Me.txtShotCharge.Size = New System.Drawing.Size(235, 20)
- Me.txtShotCharge.TabIndex = 9
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(13, 205)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(61, 13)
- Me.Label6.TabIndex = 10
- Me.Label6.Text = "Load Type:"
- '
- 'cmbLoadType
- '
- Me.cmbLoadType.DataSource = Me.ListSGShotChargeLoadsBindingSource
- Me.cmbLoadType.DisplayMember = "Name"
- Me.cmbLoadType.FormattingEnabled = True
- Me.cmbLoadType.Location = New System.Drawing.Point(110, 202)
- Me.cmbLoadType.Name = "cmbLoadType"
- Me.cmbLoadType.Size = New System.Drawing.Size(235, 21)
- Me.cmbLoadType.TabIndex = 11
- Me.cmbLoadType.ValueMember = "ID"
- '
- 'ListSGShotChargeLoadsBindingSource
- '
- Me.ListSGShotChargeLoadsBindingSource.DataMember = "List_SG_ShotCharge_Loads"
- Me.ListSGShotChargeLoadsBindingSource.DataSource = Me.MLLDataSet
- '
- 'List_SG_ShotCharge_LoadsTableAdapter
- '
- Me.List_SG_ShotCharge_LoadsTableAdapter.ClearBeforeFill = True
- '
- 'Label7
- '
- Me.Label7.Location = New System.Drawing.Point(13, 13)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(332, 44)
- Me.Label7.TabIndex = 12
- Me.Label7.Text = "Select the Components below that will go into make this kind of shotgun load. Af" & _
- "ter you have finished, click on the Next button to add the Powder Information."
- '
- 'btnNext
- '
- Me.btnNext.Location = New System.Drawing.Point(270, 277)
- Me.btnNext.Name = "btnNext"
- Me.btnNext.Size = New System.Drawing.Size(75, 23)
- Me.btnNext.TabIndex = 13
- Me.btnNext.Text = "&Next"
- Me.btnNext.UseVisualStyleBackColor = True
- '
- 'txtSource
- '
- Me.txtSource.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtSource.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtSource.Location = New System.Drawing.Point(110, 251)
- Me.txtSource.Name = "txtSource"
- Me.txtSource.ReadOnly = True
- Me.txtSource.Size = New System.Drawing.Size(235, 20)
- Me.txtSource.TabIndex = 14
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(13, 254)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(41, 13)
- Me.Label8.TabIndex = 15
- Me.Label8.Text = "Source"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(13, 230)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(81, 13)
- Me.Label9.TabIndex = 16
- Me.Label9.Text = "Personal Load?"
- '
- 'chkPersonal
- '
- Me.chkPersonal.AutoSize = True
- Me.chkPersonal.Checked = True
- Me.chkPersonal.CheckState = System.Windows.Forms.CheckState.Checked
- Me.chkPersonal.Location = New System.Drawing.Point(110, 229)
- Me.chkPersonal.Name = "chkPersonal"
- Me.chkPersonal.Size = New System.Drawing.Size(44, 17)
- Me.chkPersonal.TabIndex = 17
- Me.chkPersonal.Text = "Yes"
- Me.chkPersonal.UseVisualStyleBackColor = True
- '
- 'frmConfig_Add_Wizard_SG_2
- '
- Me.AcceptButton = Me.btnNext
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(364, 313)
- Me.Controls.Add(Me.chkPersonal)
- Me.Controls.Add(Me.Label9)
- Me.Controls.Add(Me.Label8)
- Me.Controls.Add(Me.txtSource)
- Me.Controls.Add(Me.btnNext)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.cmbLoadType)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.txtShotCharge)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.cmdShotType)
- Me.Controls.Add(Me.cmdHull)
- Me.Controls.Add(Me.cmdWAD)
- Me.Controls.Add(Me.cmbPrimer)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard_SG_2"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Shot Configuration"
- CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizardSg2))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.cmbPrimer = New System.Windows.Forms.ComboBox
+ Me.ViewPrimerListBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.cmdWAD = New System.Windows.Forms.ComboBox
+ Me.ListSGWADBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.cmdHull = New System.Windows.Forms.ComboBox
+ Me.ListSGCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.cmdShotType = New System.Windows.Forms.ComboBox
+ Me.ListSGShotTypeDetailsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.ViewPrimerListTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
+ Me.List_SG_WADTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
+ Me.List_SG_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
+ Me.List_SG_ShotType_DetailsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.txtShotCharge = New System.Windows.Forms.TextBox
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.cmbLoadType = New System.Windows.Forms.ComboBox
+ Me.ListSGShotChargeLoadsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.List_SG_ShotCharge_LoadsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.btnNext = New System.Windows.Forms.Button
+ Me.txtSource = New System.Windows.Forms.TextBox
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.Label9 = New System.Windows.Forms.Label
+ Me.chkPersonal = New System.Windows.Forms.CheckBox
+ CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(13, 73)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(39, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Primer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(13, 98)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(28, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Hull:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(13, 125)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(36, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "WAD:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(13, 152)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(59, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Shot Type:"
+ '
+ 'cmbPrimer
+ '
+ Me.cmbPrimer.DataSource = Me.ViewPrimerListBindingSource
+ Me.cmbPrimer.DisplayMember = "PrimerName"
+ Me.cmbPrimer.FormattingEnabled = True
+ Me.cmbPrimer.Location = New System.Drawing.Point(110, 70)
+ Me.cmbPrimer.Name = "cmbPrimer"
+ Me.cmbPrimer.Size = New System.Drawing.Size(235, 21)
+ Me.cmbPrimer.TabIndex = 4
+ Me.cmbPrimer.ValueMember = "ID"
+ '
+ 'ViewPrimerListBindingSource
+ '
+ Me.ViewPrimerListBindingSource.DataMember = "viewPrimerList"
+ Me.ViewPrimerListBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'cmdWAD
+ '
+ Me.cmdWAD.DataSource = Me.ListSGWADBindingSource
+ Me.cmdWAD.DisplayMember = "WAD"
+ Me.cmdWAD.FormattingEnabled = True
+ Me.cmdWAD.Location = New System.Drawing.Point(110, 122)
+ Me.cmdWAD.Name = "cmdWAD"
+ Me.cmdWAD.Size = New System.Drawing.Size(235, 21)
+ Me.cmdWAD.TabIndex = 5
+ Me.cmdWAD.ValueMember = "ID"
+ '
+ 'ListSGWADBindingSource
+ '
+ Me.ListSGWADBindingSource.DataMember = "List_SG_WAD"
+ Me.ListSGWADBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'cmdHull
+ '
+ Me.cmdHull.DataSource = Me.ListSGCaseBindingSource
+ Me.cmdHull.DisplayMember = "Name"
+ Me.cmdHull.FormattingEnabled = True
+ Me.cmdHull.Location = New System.Drawing.Point(110, 95)
+ Me.cmdHull.Name = "cmdHull"
+ Me.cmdHull.Size = New System.Drawing.Size(235, 21)
+ Me.cmdHull.TabIndex = 6
+ Me.cmdHull.ValueMember = "ID"
+ '
+ 'ListSGCaseBindingSource
+ '
+ Me.ListSGCaseBindingSource.DataMember = "List_SG_Case"
+ Me.ListSGCaseBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'cmdShotType
+ '
+ Me.cmdShotType.DataSource = Me.ListSGShotTypeDetailsBindingSource
+ Me.cmdShotType.DisplayMember = "Name"
+ Me.cmdShotType.FormattingEnabled = True
+ Me.cmdShotType.Location = New System.Drawing.Point(110, 149)
+ Me.cmdShotType.Name = "cmdShotType"
+ Me.cmdShotType.Size = New System.Drawing.Size(235, 21)
+ Me.cmdShotType.TabIndex = 7
+ Me.cmdShotType.ValueMember = "ID"
+ '
+ 'ListSGShotTypeDetailsBindingSource
+ '
+ Me.ListSGShotTypeDetailsBindingSource.DataMember = "List_SG_ShotType_Details"
+ Me.ListSGShotTypeDetailsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'ViewPrimerListTableAdapter
+ '
+ Me.ViewPrimerListTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_WADTableAdapter
+ '
+ Me.List_SG_WADTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_CaseTableAdapter
+ '
+ Me.List_SG_CaseTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_ShotType_DetailsTableAdapter
+ '
+ Me.List_SG_ShotType_DetailsTableAdapter.ClearBeforeFill = True
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 179)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(89, 13)
+ Me.Label5.TabIndex = 8
+ Me.Label5.Text = "Shot Charge (oz):"
+ '
+ 'txtShotCharge
+ '
+ Me.txtShotCharge.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtShotCharge.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtShotCharge.Location = New System.Drawing.Point(110, 176)
+ Me.txtShotCharge.Name = "txtShotCharge"
+ Me.txtShotCharge.Size = New System.Drawing.Size(235, 20)
+ Me.txtShotCharge.TabIndex = 9
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(13, 205)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(61, 13)
+ Me.Label6.TabIndex = 10
+ Me.Label6.Text = "Load Type:"
+ '
+ 'cmbLoadType
+ '
+ Me.cmbLoadType.DataSource = Me.ListSGShotChargeLoadsBindingSource
+ Me.cmbLoadType.DisplayMember = "Name"
+ Me.cmbLoadType.FormattingEnabled = True
+ Me.cmbLoadType.Location = New System.Drawing.Point(110, 202)
+ Me.cmbLoadType.Name = "cmbLoadType"
+ Me.cmbLoadType.Size = New System.Drawing.Size(235, 21)
+ Me.cmbLoadType.TabIndex = 11
+ Me.cmbLoadType.ValueMember = "ID"
+ '
+ 'ListSGShotChargeLoadsBindingSource
+ '
+ Me.ListSGShotChargeLoadsBindingSource.DataMember = "List_SG_ShotCharge_Loads"
+ Me.ListSGShotChargeLoadsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'List_SG_ShotCharge_LoadsTableAdapter
+ '
+ Me.List_SG_ShotCharge_LoadsTableAdapter.ClearBeforeFill = True
+ '
+ 'Label7
+ '
+ Me.Label7.Location = New System.Drawing.Point(13, 13)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(332, 44)
+ Me.Label7.TabIndex = 12
+ Me.Label7.Text = "Select the Components below that will go into make this kind of shotgun load. Af" & _
+ "ter you have finished, click on the Next button to add the Powder Information."
+ '
+ 'btnNext
+ '
+ Me.btnNext.Location = New System.Drawing.Point(270, 277)
+ Me.btnNext.Name = "btnNext"
+ Me.btnNext.Size = New System.Drawing.Size(75, 23)
+ Me.btnNext.TabIndex = 13
+ Me.btnNext.Text = "&Next"
+ Me.btnNext.UseVisualStyleBackColor = True
+ '
+ 'txtSource
+ '
+ Me.txtSource.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtSource.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtSource.Location = New System.Drawing.Point(110, 251)
+ Me.txtSource.Name = "txtSource"
+ Me.txtSource.ReadOnly = True
+ Me.txtSource.Size = New System.Drawing.Size(235, 20)
+ Me.txtSource.TabIndex = 14
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(13, 254)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(41, 13)
+ Me.Label8.TabIndex = 15
+ Me.Label8.Text = "Source"
+ '
+ 'Label9
+ '
+ Me.Label9.AutoSize = True
+ Me.Label9.Location = New System.Drawing.Point(13, 230)
+ Me.Label9.Name = "Label9"
+ Me.Label9.Size = New System.Drawing.Size(81, 13)
+ Me.Label9.TabIndex = 16
+ Me.Label9.Text = "Personal Load?"
+ '
+ 'chkPersonal
+ '
+ Me.chkPersonal.AutoSize = True
+ Me.chkPersonal.Checked = True
+ Me.chkPersonal.CheckState = System.Windows.Forms.CheckState.Checked
+ Me.chkPersonal.Location = New System.Drawing.Point(110, 229)
+ Me.chkPersonal.Name = "chkPersonal"
+ Me.chkPersonal.Size = New System.Drawing.Size(44, 17)
+ Me.chkPersonal.TabIndex = 17
+ Me.chkPersonal.Text = "Yes"
+ Me.chkPersonal.UseVisualStyleBackColor = True
+ '
+ 'frmConfig_Add_Wizard_SG_2
+ '
+ Me.AcceptButton = Me.btnNext
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(364, 313)
+ Me.Controls.Add(Me.chkPersonal)
+ Me.Controls.Add(Me.Label9)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.txtSource)
+ Me.Controls.Add(Me.btnNext)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.cmbLoadType)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.txtShotCharge)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.cmdShotType)
+ Me.Controls.Add(Me.cmdHull)
+ Me.Controls.Add(Me.cmdWAD)
+ Me.Controls.Add(Me.cmbPrimer)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizardSg2"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Shot Configuration"
+ CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
- Friend WithEvents cmdWAD As System.Windows.Forms.ComboBox
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ViewPrimerListBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents ViewPrimerListTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
- Friend WithEvents ListSGWADBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_WADTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
- Friend WithEvents cmdHull As System.Windows.Forms.ComboBox
- Friend WithEvents ListSGCaseBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
- Friend WithEvents cmdShotType As System.Windows.Forms.ComboBox
- Friend WithEvents ListSGShotTypeDetailsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_ShotType_DetailsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents txtShotCharge As System.Windows.Forms.TextBox
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents cmbLoadType As System.Windows.Forms.ComboBox
- Friend WithEvents ListSGShotChargeLoadsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_ShotCharge_LoadsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents btnNext As System.Windows.Forms.Button
- Friend WithEvents txtSource As System.Windows.Forms.TextBox
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
-End Class
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
+ Friend WithEvents cmdWAD As System.Windows.Forms.ComboBox
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ViewPrimerListBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents ViewPrimerListTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
+ Friend WithEvents ListSGWADBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_WADTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
+ Friend WithEvents cmdHull As System.Windows.Forms.ComboBox
+ Friend WithEvents ListSGCaseBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
+ Friend WithEvents cmdShotType As System.Windows.Forms.ComboBox
+ Friend WithEvents ListSGShotTypeDetailsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_ShotType_DetailsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents txtShotCharge As System.Windows.Forms.TextBox
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents cmbLoadType As System.Windows.Forms.ComboBox
+ Friend WithEvents ListSGShotChargeLoadsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_ShotCharge_LoadsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents btnNext As System.Windows.Forms.Button
+ Friend WithEvents txtSource As System.Windows.Forms.TextBox
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents Label9 As System.Windows.Forms.Label
+ Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.vb
index 1e2a316..e61cc9d 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_2.vb
@@ -1,101 +1,177 @@
-Imports System.Data
-Imports System.Data.Odbc
-Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmConfig_Add_Wizard_SG_2
+Namespace Adding
'''
- ''' The error out
+ ''' Class frmConfig_Add_Wizard_SG_2.
+ ''' Implements the
'''
- Dim errOut as String
- Public ConfigName As String
- Public CalID As Long
- Public CalName As String
- Public GID As Long
- Public ConfigID As Long
- Private Sub frmConfig_Add_Wizard_SG_2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.List_SG_ShotType_DetailsTableAdapter.FillBy_CFG_List(Me.MLLDataSet.List_SG_ShotType_Details)
- Me.List_SG_CaseTableAdapter.FillBy_CFG_List(Me.MLLDataSet.List_SG_Case, GID)
- Me.List_SG_WADTableAdapter.FillBy_CFG_WADList(Me.MLLDataSet.List_SG_WAD, GID)
- Me.ViewPrimerListTableAdapter.FillBy_CFG_List(Me.MLLDataSet.viewPrimerList)
- Dim WID As Long = cmdWAD.SelectedValue
- txtShotCharge.Text = GetMaxWADCharge(WID)
- Me.List_SG_ShotCharge_LoadsTableAdapter.Fill(Me.MLLDataSet.List_SG_ShotCharge_Loads)
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtSource.AutoCompleteCustomSource = ObjAF.Config_Source_SG
- txtShotCharge.AutoCompleteCustomSource = ObjAF.Config_LoadInOZ_SG
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Function GetMaxWADCharge(ByVal iID As Long) As String
- Dim sAns As String = ""
- Try
- Dim SQL As String = "SELECT * from List_SG_WAD where ID=" & iID
- Dim Obj As New BSDatabase
- Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- sAns = RS("load_t")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "GetMaxWADCharge", Err.Number, ex.Message.ToString)
- End Try
- Return sAns
- End Function
- Private Sub cmdWAD_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdWAD.SelectedIndexChanged
- Dim WID As Long = cmdWAD.SelectedValue
- txtShotCharge.Text = GetMaxWADCharge(WID)
- End Sub
+ '''
+ Public Class FrmConfigAddWizardSg2
+ ' TODO: #20 Code Cleanup
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The cal identifier
+ '''
+ Public CaliberId As Long
+ '''
+ ''' The cal name
+ '''
+ Public CaliberName As String
+ '''
+ ''' The gauge id
+ '''
+ Public GaugeId As Long
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_SG_2 control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub frmConfig_Add_Wizard_SG_2_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ List_SG_ShotType_DetailsTableAdapter.FillBy_CFG_List(MLLDataSet.List_SG_ShotType_Details)
+ List_SG_CaseTableAdapter.FillBy_CFG_List(MLLDataSet.List_SG_Case, GaugeId)
+ List_SG_WADTableAdapter.FillBy_CFG_WADList(MLLDataSet.List_SG_WAD, GaugeId)
+ ViewPrimerListTableAdapter.FillBy_CFG_List(MLLDataSet.viewPrimerList)
+ Dim wadId As Long = cmdWAD.SelectedValue
+ txtShotCharge.Text = GetMaxWADCharge(wadId)
+ List_SG_ShotCharge_LoadsTableAdapter.Fill(MLLDataSet.List_SG_ShotCharge_Loads)
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtSource.AutoCompleteCustomSource = ObjAF.Config_Source_SG
+ 'txtShotCharge.AutoCompleteCustomSource = ObjAF.Config_LoadInOZ_SG
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ txtSource.AutoCompleteCustomSource = ConfigShotgun.Source(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtShotCharge.AutoCompleteCustomSource = ConfigShotgun.LoadInOunces(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Gets the maximum wad charge.
+ '''
+ ''' The i identifier.
+ ''' System.String.
+
+ Function GetMaxWADCharge(ByVal iID As Long) As String
+ Dim sAns As String = ""
+ Try
+ Dim lst As List(Of WadData) = WadInventory.GetDetails(DatabasePath, iID, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As WadData In lst
+ sAns = o.LoadInOzText
+ Next
+ 'Dim SQL As String = "SELECT * from List_SG_WAD where ID=" & iID
+ 'Dim Obj As New BSDatabase
+ 'Obj.ConnectDB()
+ 'Dim CMD As New OdbcCommand(Sql, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'While RS.Read
+ ' sAns = RS("load_t")
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "GetMaxWADCharge", Err.Number, ex.Message.ToString)
+ End Try
+ Return sAns
+ End Function
+ '''
+ ''' Handles the SelectedIndexChanged event of the cmdWAD control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub cmdWAD_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cmdWAD.SelectedIndexChanged
+ Try
+ Dim wadId As Long = cmdWAD.SelectedValue
+ txtShotCharge.Text = GetMaxWADCharge(wadId)
+ Catch ex As Exception
+ Call LogError(Name, "cmdWAD_SelectedIndexChanged", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
- Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
- Try
- Dim PID As Long = cmbPrimer.SelectedValue
- Dim HID As Long = cmdHull.SelectedValue
- Dim WID As Long = cmdWAD.SelectedValue
- Dim sLoad As String = txtShotCharge.Text
- Dim dLoad As Double = Converters.ConvertOZToDouble(sLoad, errOut)
- Dim SLTID As Long = cmdShotType.SelectedValue
- Dim LTID As Long = cmbLoadType.SelectedValue
- Dim sSource As String = GeneralHelpers.FluffContent(txtSource.Text)
- Dim IsPersonal As Boolean = chkPersonal.Checked
- Dim iPersonal As Integer = 1
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If Not IsPersonal Then iPersonal = 0
- SQL = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,SW,SW_t,WAD" & _
- ",SCL,Source,GID,IsPersonal,LTID) VALUES(" & ConfigID & "," & CalID & "," & GID & "," & PID & _
- "," & HID & "," & dLoad & ",'" & sLoad & "'," & WID & "," & SLTID & ",'" & _
- sSource & "'," & GID & "," & iPersonal & "," & LTID & ")"
- Obj.ConnExec(SQL)
- SQL = "UPDATE Config_List_Name set IsPersonal=" & iPersonal & " where id=" & ConfigID
- Obj.ConnExec(SQL)
- frmConfig_Add_Wizard_SG_Powder.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_SG_Powder.ConfigID = ConfigID
- frmConfig_Add_Wizard_SG_Powder.ConfigName = ConfigName
- frmConfig_Add_Wizard_SG_Powder.CalName = CalName
- frmConfig_Add_Wizard_SG_Powder.FromConfigWiz = True
- frmConfig_Add_Wizard_SG_Powder.CalID = CalID
- frmConfig_Add_Wizard_SG_Powder.GID = GID
- frmConfig_Add_Wizard_SG_Powder.Show()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnNext.Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-
- Private Sub chkPersonal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkPersonal.CheckedChanged
- If chkPersonal.Checked Then
- txtSource.ReadOnly = True
- Else
- txtSource.ReadOnly = False
- End If
- End Sub
-End Class
\ No newline at end of file
+ '''
+ ''' Handles the Click event of the btnNext control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click
+ Try
+ Dim primerId As Long = cmbPrimer.SelectedValue
+ Dim hullId As Long = cmdHull.SelectedValue
+ Dim wadId As Long = cmdWAD.SelectedValue
+ Dim shotCharge As String = txtShotCharge.Text
+ Dim shotChargeNumeric As Double = Converters.ConvertOzToDouble(shotCharge, _errOut)
+ Dim shotTypeId As Long = cmdShotType.SelectedValue
+ Dim loadTypeId As Long = cmbLoadType.SelectedValue
+ Dim source As String = GeneralHelpers.FluffContent(txtSource.Text)
+ ' TODO: Double check this
+ If Not ConfigListDataShotgun.Add(DatabasePath, ConfigId, CaliberId,
+ GaugeId, primerId, hullId, shotChargeNumeric,
+ shotCharge, shotTypeId, 0, wadId,
+ loadTypeId, source, GaugeId, chkPersonal.Checked,
+ loadTypeId, 0, 0,
+ _errOut) Then Throw new Exception(_errOut)
+ If Not ConfigListDataName.SetPersonal(DatabaseName, ConfigId, chkPersonal.Checked,
+ _errOut) Then Throw New Exception(_errOut)
+ 'Dim isPersonal As Boolean = chkPersonal.Checked
+ 'Dim iPersonal As Integer = 1
+ 'Dim sql As String = ""
+ 'Dim obj As New BSDatabase
+ 'If Not isPersonal Then iPersonal = 0
+ 'sql = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,SW,SW_t,WAD" & _
+ ' ",SCL,Source,GID,IsPersonal,LTID) VALUES(" & ConfigId & "," & CaliberId & "," & GaugeId & "," & primerId & _
+ ' "," & hullId & "," & shotChargeNumeric & ",'" & shotCharge & "'," & wadId & "," & shotTypeId & ",'" & _
+ ' source & "'," & GaugeId & "," & iPersonal & "," & loadTypeId & ")"
+ 'obj.ConnExec(sql)
+ 'sql = "UPDATE Config_List_Name set IsPersonal=" & iPersonal & " where id=" & ConfigId
+ 'obj.ConnExec(sql)
+ frmConfig_Add_Wizard_SG_Powder.MdiParent = MdiParent
+ frmConfig_Add_Wizard_SG_Powder.ConfigID = ConfigId
+ frmConfig_Add_Wizard_SG_Powder.ConfigName = ConfigName
+ frmConfig_Add_Wizard_SG_Powder.CalName = CaliberName
+ frmConfig_Add_Wizard_SG_Powder.FromConfigWiz = True
+ frmConfig_Add_Wizard_SG_Powder.CalID = CaliberId
+ frmConfig_Add_Wizard_SG_Powder.GID = GaugeId
+ frmConfig_Add_Wizard_SG_Powder.Show()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "btnNext.Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkPersonal control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkPersonal_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkPersonal.CheckedChanged
+ If chkPersonal.Checked Then
+ txtSource.ReadOnly = True
+ Else
+ txtSource.ReadOnly = False
+ End If
+ End Sub
+ End Class
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.Designer.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.Designer.vb
index 634555a..692fbb5 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.Designer.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.Designer.vb
@@ -1,334 +1,336 @@
- _
-Partial Class frmConfig_Add_Wizard_SG_3
- Inherits System.Windows.Forms.Form
+Namespace Adding
+ _
+ Partial Class FrmConfigAddWizardSg3
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Add_Wizard_SG_3))
- Me.chkPersonal = New System.Windows.Forms.CheckBox
- Me.Label9 = New System.Windows.Forms.Label
- Me.Label8 = New System.Windows.Forms.Label
- Me.txtSource = New System.Windows.Forms.TextBox
- Me.btnNext = New System.Windows.Forms.Button
- Me.Label7 = New System.Windows.Forms.Label
- Me.cmbLoadType = New System.Windows.Forms.ComboBox
- Me.ListSGShotChargeLoadsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.Label6 = New System.Windows.Forms.Label
- Me.cmdHull = New System.Windows.Forms.ComboBox
- Me.ListSGCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.cmdWAD = New System.Windows.Forms.ComboBox
- Me.ListSGWADBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.cmbPrimer = New System.Windows.Forms.ComboBox
- Me.ViewPrimerListBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.cmbSlug = New System.Windows.Forms.ComboBox
- Me.ListSGShotTypeDetailsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.ViewPrimerListTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
- Me.List_SG_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
- Me.List_SG_WADTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
- Me.List_SG_ShotCharge_LoadsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
- Me.List_SG_ShotType_DetailsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
- CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'chkPersonal
- '
- Me.chkPersonal.AutoSize = True
- Me.chkPersonal.Checked = True
- Me.chkPersonal.CheckState = System.Windows.Forms.CheckState.Checked
- Me.chkPersonal.Location = New System.Drawing.Point(109, 200)
- Me.chkPersonal.Name = "chkPersonal"
- Me.chkPersonal.Size = New System.Drawing.Size(44, 17)
- Me.chkPersonal.TabIndex = 35
- Me.chkPersonal.Text = "Yes"
- Me.chkPersonal.UseVisualStyleBackColor = True
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(12, 201)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(81, 13)
- Me.Label9.TabIndex = 34
- Me.Label9.Text = "Personal Load?"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(12, 225)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(41, 13)
- Me.Label8.TabIndex = 33
- Me.Label8.Text = "Source"
- '
- 'txtSource
- '
- Me.txtSource.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtSource.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtSource.Location = New System.Drawing.Point(109, 222)
- Me.txtSource.Name = "txtSource"
- Me.txtSource.ReadOnly = True
- Me.txtSource.Size = New System.Drawing.Size(235, 20)
- Me.txtSource.TabIndex = 32
- '
- 'btnNext
- '
- Me.btnNext.Location = New System.Drawing.Point(269, 248)
- Me.btnNext.Name = "btnNext"
- Me.btnNext.Size = New System.Drawing.Size(75, 23)
- Me.btnNext.TabIndex = 31
- Me.btnNext.Text = "&Next"
- Me.btnNext.UseVisualStyleBackColor = True
- '
- 'Label7
- '
- Me.Label7.Location = New System.Drawing.Point(12, 9)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(332, 44)
- Me.Label7.TabIndex = 30
- Me.Label7.Text = "Select the Components below that will go into make this kind of shotgun load. Af" & _
- "ter you have finished, click on the Next button to add the Powder Information."
- '
- 'cmbLoadType
- '
- Me.cmbLoadType.DataSource = Me.ListSGShotChargeLoadsBindingSource
- Me.cmbLoadType.DisplayMember = "Name"
- Me.cmbLoadType.FormattingEnabled = True
- Me.cmbLoadType.Location = New System.Drawing.Point(109, 173)
- Me.cmbLoadType.Name = "cmbLoadType"
- Me.cmbLoadType.Size = New System.Drawing.Size(235, 21)
- Me.cmbLoadType.TabIndex = 29
- Me.cmbLoadType.ValueMember = "ID"
- '
- 'ListSGShotChargeLoadsBindingSource
- '
- Me.ListSGShotChargeLoadsBindingSource.DataMember = "List_SG_ShotCharge_Loads"
- Me.ListSGShotChargeLoadsBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(12, 176)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(61, 13)
- Me.Label6.TabIndex = 28
- Me.Label6.Text = "Load Type:"
- '
- 'cmdHull
- '
- Me.cmdHull.DataSource = Me.ListSGCaseBindingSource
- Me.cmdHull.DisplayMember = "Name"
- Me.cmdHull.FormattingEnabled = True
- Me.cmdHull.Location = New System.Drawing.Point(109, 91)
- Me.cmdHull.Name = "cmdHull"
- Me.cmdHull.Size = New System.Drawing.Size(235, 21)
- Me.cmdHull.TabIndex = 24
- Me.cmdHull.ValueMember = "ID"
- '
- 'ListSGCaseBindingSource
- '
- Me.ListSGCaseBindingSource.DataMember = "List_SG_Case"
- Me.ListSGCaseBindingSource.DataSource = Me.MLLDataSet
- '
- 'cmdWAD
- '
- Me.cmdWAD.DataSource = Me.ListSGWADBindingSource
- Me.cmdWAD.DisplayMember = "WAD"
- Me.cmdWAD.FormattingEnabled = True
- Me.cmdWAD.Location = New System.Drawing.Point(109, 118)
- Me.cmdWAD.Name = "cmdWAD"
- Me.cmdWAD.Size = New System.Drawing.Size(235, 21)
- Me.cmdWAD.TabIndex = 23
- Me.cmdWAD.ValueMember = "ID"
- '
- 'ListSGWADBindingSource
- '
- Me.ListSGWADBindingSource.DataMember = "List_SG_WAD"
- Me.ListSGWADBindingSource.DataSource = Me.MLLDataSet
- '
- 'cmbPrimer
- '
- Me.cmbPrimer.DataSource = Me.ViewPrimerListBindingSource
- Me.cmbPrimer.DisplayMember = "PrimerName"
- Me.cmbPrimer.FormattingEnabled = True
- Me.cmbPrimer.Location = New System.Drawing.Point(109, 66)
- Me.cmbPrimer.Name = "cmbPrimer"
- Me.cmbPrimer.Size = New System.Drawing.Size(235, 21)
- Me.cmbPrimer.TabIndex = 22
- Me.cmbPrimer.ValueMember = "ID"
- '
- 'ViewPrimerListBindingSource
- '
- Me.ViewPrimerListBindingSource.DataMember = "viewPrimerList"
- Me.ViewPrimerListBindingSource.DataSource = Me.MLLDataSet
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 121)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(36, 13)
- Me.Label3.TabIndex = 20
- Me.Label3.Text = "WAD:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 94)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(28, 13)
- Me.Label2.TabIndex = 19
- Me.Label2.Text = "Hull:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 69)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(39, 13)
- Me.Label1.TabIndex = 18
- Me.Label1.Text = "Primer:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 149)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(58, 13)
- Me.Label4.TabIndex = 36
- Me.Label4.Text = "Slug Type:"
- '
- 'cmbSlug
- '
- Me.cmbSlug.DataSource = Me.ListSGShotTypeDetailsBindingSource
- Me.cmbSlug.DisplayMember = "Name"
- Me.cmbSlug.FormattingEnabled = True
- Me.cmbSlug.Location = New System.Drawing.Point(109, 145)
- Me.cmbSlug.Name = "cmbSlug"
- Me.cmbSlug.Size = New System.Drawing.Size(235, 21)
- Me.cmbSlug.TabIndex = 37
- Me.cmbSlug.ValueMember = "ID"
- '
- 'ListSGShotTypeDetailsBindingSource
- '
- Me.ListSGShotTypeDetailsBindingSource.DataMember = "List_SG_ShotType_Details"
- Me.ListSGShotTypeDetailsBindingSource.DataSource = Me.MLLDataSet
- '
- 'ViewPrimerListTableAdapter
- '
- Me.ViewPrimerListTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_CaseTableAdapter
- '
- Me.List_SG_CaseTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_WADTableAdapter
- '
- Me.List_SG_WADTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_ShotCharge_LoadsTableAdapter
- '
- Me.List_SG_ShotCharge_LoadsTableAdapter.ClearBeforeFill = True
- '
- 'List_SG_ShotType_DetailsTableAdapter
- '
- Me.List_SG_ShotType_DetailsTableAdapter.ClearBeforeFill = True
- '
- 'frmConfig_Add_Wizard_SG_3
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(366, 290)
- Me.Controls.Add(Me.cmbSlug)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.chkPersonal)
- Me.Controls.Add(Me.Label9)
- Me.Controls.Add(Me.Label8)
- Me.Controls.Add(Me.txtSource)
- Me.Controls.Add(Me.btnNext)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.cmbLoadType)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.cmdHull)
- Me.Controls.Add(Me.cmdWAD)
- Me.Controls.Add(Me.cmbPrimer)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmConfig_Add_Wizard_SG_3"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Slug Configuration"
- CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmConfigAddWizardSg3))
+ Me.chkPersonal = New System.Windows.Forms.CheckBox
+ Me.Label9 = New System.Windows.Forms.Label
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.txtSource = New System.Windows.Forms.TextBox
+ Me.btnNext = New System.Windows.Forms.Button
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.cmbLoadType = New System.Windows.Forms.ComboBox
+ Me.ListSGShotChargeLoadsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.cmdHull = New System.Windows.Forms.ComboBox
+ Me.ListSGCaseBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.cmdWAD = New System.Windows.Forms.ComboBox
+ Me.ListSGWADBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.cmbPrimer = New System.Windows.Forms.ComboBox
+ Me.ViewPrimerListBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.cmbSlug = New System.Windows.Forms.ComboBox
+ Me.ListSGShotTypeDetailsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.ViewPrimerListTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
+ Me.List_SG_CaseTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
+ Me.List_SG_WADTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
+ Me.List_SG_ShotCharge_LoadsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
+ Me.List_SG_ShotType_DetailsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
+ CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'chkPersonal
+ '
+ Me.chkPersonal.AutoSize = True
+ Me.chkPersonal.Checked = True
+ Me.chkPersonal.CheckState = System.Windows.Forms.CheckState.Checked
+ Me.chkPersonal.Location = New System.Drawing.Point(109, 200)
+ Me.chkPersonal.Name = "chkPersonal"
+ Me.chkPersonal.Size = New System.Drawing.Size(44, 17)
+ Me.chkPersonal.TabIndex = 35
+ Me.chkPersonal.Text = "Yes"
+ Me.chkPersonal.UseVisualStyleBackColor = True
+ '
+ 'Label9
+ '
+ Me.Label9.AutoSize = True
+ Me.Label9.Location = New System.Drawing.Point(12, 201)
+ Me.Label9.Name = "Label9"
+ Me.Label9.Size = New System.Drawing.Size(81, 13)
+ Me.Label9.TabIndex = 34
+ Me.Label9.Text = "Personal Load?"
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(12, 225)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(41, 13)
+ Me.Label8.TabIndex = 33
+ Me.Label8.Text = "Source"
+ '
+ 'txtSource
+ '
+ Me.txtSource.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtSource.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtSource.Location = New System.Drawing.Point(109, 222)
+ Me.txtSource.Name = "txtSource"
+ Me.txtSource.ReadOnly = True
+ Me.txtSource.Size = New System.Drawing.Size(235, 20)
+ Me.txtSource.TabIndex = 32
+ '
+ 'btnNext
+ '
+ Me.btnNext.Location = New System.Drawing.Point(269, 248)
+ Me.btnNext.Name = "btnNext"
+ Me.btnNext.Size = New System.Drawing.Size(75, 23)
+ Me.btnNext.TabIndex = 31
+ Me.btnNext.Text = "&Next"
+ Me.btnNext.UseVisualStyleBackColor = True
+ '
+ 'Label7
+ '
+ Me.Label7.Location = New System.Drawing.Point(12, 9)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(332, 44)
+ Me.Label7.TabIndex = 30
+ Me.Label7.Text = "Select the Components below that will go into make this kind of shotgun load. Af" & _
+ "ter you have finished, click on the Next button to add the Powder Information."
+ '
+ 'cmbLoadType
+ '
+ Me.cmbLoadType.DataSource = Me.ListSGShotChargeLoadsBindingSource
+ Me.cmbLoadType.DisplayMember = "Name"
+ Me.cmbLoadType.FormattingEnabled = True
+ Me.cmbLoadType.Location = New System.Drawing.Point(109, 173)
+ Me.cmbLoadType.Name = "cmbLoadType"
+ Me.cmbLoadType.Size = New System.Drawing.Size(235, 21)
+ Me.cmbLoadType.TabIndex = 29
+ Me.cmbLoadType.ValueMember = "ID"
+ '
+ 'ListSGShotChargeLoadsBindingSource
+ '
+ Me.ListSGShotChargeLoadsBindingSource.DataMember = "List_SG_ShotCharge_Loads"
+ Me.ListSGShotChargeLoadsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 176)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(61, 13)
+ Me.Label6.TabIndex = 28
+ Me.Label6.Text = "Load Type:"
+ '
+ 'cmdHull
+ '
+ Me.cmdHull.DataSource = Me.ListSGCaseBindingSource
+ Me.cmdHull.DisplayMember = "Name"
+ Me.cmdHull.FormattingEnabled = True
+ Me.cmdHull.Location = New System.Drawing.Point(109, 91)
+ Me.cmdHull.Name = "cmdHull"
+ Me.cmdHull.Size = New System.Drawing.Size(235, 21)
+ Me.cmdHull.TabIndex = 24
+ Me.cmdHull.ValueMember = "ID"
+ '
+ 'ListSGCaseBindingSource
+ '
+ Me.ListSGCaseBindingSource.DataMember = "List_SG_Case"
+ Me.ListSGCaseBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'cmdWAD
+ '
+ Me.cmdWAD.DataSource = Me.ListSGWADBindingSource
+ Me.cmdWAD.DisplayMember = "WAD"
+ Me.cmdWAD.FormattingEnabled = True
+ Me.cmdWAD.Location = New System.Drawing.Point(109, 118)
+ Me.cmdWAD.Name = "cmdWAD"
+ Me.cmdWAD.Size = New System.Drawing.Size(235, 21)
+ Me.cmdWAD.TabIndex = 23
+ Me.cmdWAD.ValueMember = "ID"
+ '
+ 'ListSGWADBindingSource
+ '
+ Me.ListSGWADBindingSource.DataMember = "List_SG_WAD"
+ Me.ListSGWADBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'cmbPrimer
+ '
+ Me.cmbPrimer.DataSource = Me.ViewPrimerListBindingSource
+ Me.cmbPrimer.DisplayMember = "PrimerName"
+ Me.cmbPrimer.FormattingEnabled = True
+ Me.cmbPrimer.Location = New System.Drawing.Point(109, 66)
+ Me.cmbPrimer.Name = "cmbPrimer"
+ Me.cmbPrimer.Size = New System.Drawing.Size(235, 21)
+ Me.cmbPrimer.TabIndex = 22
+ Me.cmbPrimer.ValueMember = "ID"
+ '
+ 'ViewPrimerListBindingSource
+ '
+ Me.ViewPrimerListBindingSource.DataMember = "viewPrimerList"
+ Me.ViewPrimerListBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 121)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(36, 13)
+ Me.Label3.TabIndex = 20
+ Me.Label3.Text = "WAD:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 94)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(28, 13)
+ Me.Label2.TabIndex = 19
+ Me.Label2.Text = "Hull:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 69)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(39, 13)
+ Me.Label1.TabIndex = 18
+ Me.Label1.Text = "Primer:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 149)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(58, 13)
+ Me.Label4.TabIndex = 36
+ Me.Label4.Text = "Slug Type:"
+ '
+ 'cmbSlug
+ '
+ Me.cmbSlug.DataSource = Me.ListSGShotTypeDetailsBindingSource
+ Me.cmbSlug.DisplayMember = "Name"
+ Me.cmbSlug.FormattingEnabled = True
+ Me.cmbSlug.Location = New System.Drawing.Point(109, 145)
+ Me.cmbSlug.Name = "cmbSlug"
+ Me.cmbSlug.Size = New System.Drawing.Size(235, 21)
+ Me.cmbSlug.TabIndex = 37
+ Me.cmbSlug.ValueMember = "ID"
+ '
+ 'ListSGShotTypeDetailsBindingSource
+ '
+ Me.ListSGShotTypeDetailsBindingSource.DataMember = "List_SG_ShotType_Details"
+ Me.ListSGShotTypeDetailsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'ViewPrimerListTableAdapter
+ '
+ Me.ViewPrimerListTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_CaseTableAdapter
+ '
+ Me.List_SG_CaseTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_WADTableAdapter
+ '
+ Me.List_SG_WADTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_ShotCharge_LoadsTableAdapter
+ '
+ Me.List_SG_ShotCharge_LoadsTableAdapter.ClearBeforeFill = True
+ '
+ 'List_SG_ShotType_DetailsTableAdapter
+ '
+ Me.List_SG_ShotType_DetailsTableAdapter.ClearBeforeFill = True
+ '
+ 'frmConfig_Add_Wizard_SG_3
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(366, 290)
+ Me.Controls.Add(Me.cmbSlug)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.chkPersonal)
+ Me.Controls.Add(Me.Label9)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.txtSource)
+ Me.Controls.Add(Me.btnNext)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.cmbLoadType)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.cmdHull)
+ Me.Controls.Add(Me.cmdWAD)
+ Me.Controls.Add(Me.cmbPrimer)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmConfigAddWizardSg3"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "Slug Configuration"
+ CType(Me.ListSGShotChargeLoadsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGCaseBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGWADBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ViewPrimerListBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.ListSGShotTypeDetailsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents txtSource As System.Windows.Forms.TextBox
- Friend WithEvents btnNext As System.Windows.Forms.Button
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents cmbLoadType As System.Windows.Forms.ComboBox
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents cmdHull As System.Windows.Forms.ComboBox
- Friend WithEvents cmdWAD As System.Windows.Forms.ComboBox
- Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ViewPrimerListBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents ViewPrimerListTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
- Friend WithEvents ListSGCaseBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
- Friend WithEvents ListSGWADBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_WADTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
- Friend WithEvents ListSGShotChargeLoadsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_ShotCharge_LoadsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents cmbSlug As System.Windows.Forms.ComboBox
- Friend WithEvents ListSGShotTypeDetailsBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_ShotType_DetailsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
-End Class
+ End Sub
+ Friend WithEvents chkPersonal As System.Windows.Forms.CheckBox
+ Friend WithEvents Label9 As System.Windows.Forms.Label
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents txtSource As System.Windows.Forms.TextBox
+ Friend WithEvents btnNext As System.Windows.Forms.Button
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents cmbLoadType As System.Windows.Forms.ComboBox
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents cmdHull As System.Windows.Forms.ComboBox
+ Friend WithEvents cmdWAD As System.Windows.Forms.ComboBox
+ Friend WithEvents cmbPrimer As System.Windows.Forms.ComboBox
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ViewPrimerListBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents ViewPrimerListTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.viewPrimerListTableAdapter
+ Friend WithEvents ListSGCaseBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_CaseTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_CaseTableAdapter
+ Friend WithEvents ListSGWADBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_WADTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_WADTableAdapter
+ Friend WithEvents ListSGShotChargeLoadsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_ShotCharge_LoadsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotCharge_LoadsTableAdapter
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents cmbSlug As System.Windows.Forms.ComboBox
+ Friend WithEvents ListSGShotTypeDetailsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_ShotType_DetailsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_ShotType_DetailsTableAdapter
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.vb
index 59b55c1..68beeb0 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_3.vb
@@ -1,65 +1,110 @@
Imports System.Data
Imports System.Data.Odbc
Imports BSMyLoadersLog.LoadersClass
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
-Public Class frmConfig_Add_Wizard_SG_3
- Public ConfigName As String
- Public CalID As Long
- Public ConfigID As Long
- Public CalName As String
- Public GID As Long
- Private Sub frmConfig_Add_Wizard_SG_3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.List_SG_ShotType_DetailsTableAdapter.FillBy_CFG_List_Slug(Me.MLLDataSet.List_SG_ShotType_Details, CalName)
- Me.List_SG_ShotCharge_LoadsTableAdapter.Fill(Me.MLLDataSet.List_SG_ShotCharge_Loads)
- Me.List_SG_WADTableAdapter.FillBy_CFG_WADList(Me.MLLDataSet.List_SG_WAD, GID)
- Me.List_SG_CaseTableAdapter.FillBy_CFG_List(Me.MLLDataSet.List_SG_Case, GID)
- Me.ViewPrimerListTableAdapter.Fill(Me.MLLDataSet.viewPrimerList)
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtSource.AutoCompleteCustomSource = ObjAF.Config_Source_SG
- Catch ex As Exception
- Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+Namespace Adding
- Private Sub chkPersonal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkPersonal.CheckedChanged
- If chkPersonal.Checked Then
- txtSource.ReadOnly = True
- Else
- txtSource.ReadOnly = False
- End If
- End Sub
-
- Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
- Try
- Dim PID As Long = cmbPrimer.SelectedValue
- Dim HID As Long = cmdHull.SelectedValue
- Dim WID As Long = cmdWAD.SelectedValue
- Dim STID As Long = cmbSlug.SelectedValue
- Dim LTID As Long = cmbLoadType.SelectedValue
- Dim sSource As String = GeneralHelpers.FluffContent(txtSource.Text)
- Dim IsPersonal As Boolean = chkPersonal.Checked
- Dim iPersonal As Integer = 1
- Dim SQL As String = ""
- Dim Obj As New BSDatabase
- If Not IsPersonal Then iPersonal = 0
- SQL = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,WAD" & _
- ",SCL,Source,GID,IsPersonal,LTID) VALUES(" & ConfigID & "," & CalID & "," & GID & "," & PID & _
- "," & HID & "," & WID & "," & STID & ",'" & _
- sSource & "'," & GID & "," & iPersonal & "," & LTID & ")"
- Obj.ConnExec(SQL)
- frmConfig_Add_Wizard_SG_Powder.MdiParent = Me.MdiParent
- frmConfig_Add_Wizard_SG_Powder.ConfigID = ConfigID
- frmConfig_Add_Wizard_SG_Powder.ConfigName = ConfigName
- frmConfig_Add_Wizard_SG_Powder.CalName = CalName
- frmConfig_Add_Wizard_SG_Powder.CalID = CalID
- frmConfig_Add_Wizard_SG_Powder.FromConfigWiz = True
- frmConfig_Add_Wizard_SG_Powder.GID = GID
- frmConfig_Add_Wizard_SG_Powder.Show()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "btnNext_Click", Err.Number, ex.Message.ToString)
- End Try
- End Sub
-End Class
\ No newline at end of file
+ '''
+ ''' Class frmConfig_Add_Wizard_SG_3.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmConfigAddWizardSg3
+ ' TODO: #20 Code Cleanup
+ '''
+ ''' The error out
+ '''
+ Dim errOut as String
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The cal identifier
+ '''
+ Public CaliberId As Long
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' The cal name
+ '''
+ Public CaliberName As String
+ '''
+ ''' The gid
+ '''
+ Public GaugeId As Long
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_SG_3 control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub frmConfig_Add_Wizard_SG_3_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Try
+ List_SG_ShotType_DetailsTableAdapter.FillBy_CFG_List_Slug(MLLDataSet.List_SG_ShotType_Details, CaliberName)
+ List_SG_ShotCharge_LoadsTableAdapter.Fill(MLLDataSet.List_SG_ShotCharge_Loads)
+ List_SG_WADTableAdapter.FillBy_CFG_WADList(MLLDataSet.List_SG_WAD, GaugeId)
+ List_SG_CaseTableAdapter.FillBy_CFG_List(MLLDataSet.List_SG_Case, GaugeId)
+ ViewPrimerListTableAdapter.Fill(MLLDataSet.viewPrimerList)
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtSource.AutoCompleteCustomSource = ObjAF.Config_Source_SG
+ txtSource.AutoCompleteCustomSource = ConfigShotgun.Source(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
+ Catch ex As Exception
+ Call LogError(Me.Name, "Load", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the CheckedChanged event of the chkPersonal control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub chkPersonal_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkPersonal.CheckedChanged
+ If chkPersonal.Checked Then
+ txtSource.ReadOnly = True
+ Else
+ txtSource.ReadOnly = False
+ End If
+ End Sub
+ '''
+ ''' Handles the Click event of the btnNext control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click
+ Try
+ Dim primerId As Long = cmbPrimer.SelectedValue
+ Dim hullId As Long = cmdHull.SelectedValue
+ Dim wadId As Long = cmdWAD.SelectedValue
+ Dim slugId As Long = cmbSlug.SelectedValue
+ Dim loadTypeId As Long = cmbLoadType.SelectedValue
+ Dim source As String = GeneralHelpers.FluffContent(txtSource.Text)
+ Dim isPersonal As Boolean = chkPersonal.Checked
+ Dim iPersonal As Integer = 1
+ Dim sql As String = ""
+ Dim obj As New BSDatabase
+ If Not isPersonal Then iPersonal = 0
+ sql = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,WAD" & _
+ ",SCL,Source,GID,IsPersonal,LTID) VALUES(" & ConfigId & "," & CaliberId & "," & GaugeId & "," & primerId & _
+ "," & hullId & "," & wadId & "," & slugId & ",'" & _
+ source & "'," & GaugeId & "," & iPersonal & "," & loadTypeId & ")"
+ obj.ConnExec(sql)
+ frmConfig_Add_Wizard_SG_Powder.MdiParent = Me.MdiParent
+ frmConfig_Add_Wizard_SG_Powder.ConfigID = ConfigId
+ frmConfig_Add_Wizard_SG_Powder.ConfigName = ConfigName
+ frmConfig_Add_Wizard_SG_Powder.CalName = CaliberName
+ frmConfig_Add_Wizard_SG_Powder.CalID = CaliberId
+ frmConfig_Add_Wizard_SG_Powder.FromConfigWiz = True
+ frmConfig_Add_Wizard_SG_Powder.GID = GaugeId
+ frmConfig_Add_Wizard_SG_Powder.Show()
+ Me.Close()
+ Catch ex As Exception
+ Call LogError(Me.Name, "btnNext_Click", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_Powder.vb b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_Powder.vb
index a84351e..9db6f4b 100644
--- a/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_Powder.vb
+++ b/BSMyLoadersLog/Adding/frmConfig_Add_Wizard_SG_Powder.vb
@@ -2,17 +2,47 @@ Imports System.Data
Imports System.Data.Odbc
Imports BSMyLoadersLog.LoadersClass
Imports BurnSoft.Applications.MLL.Helpers
-
+'''
+''' Class frmConfig_Add_Wizard_SG_Powder.
+''' Implements the
+'''
+'''
Public Class frmConfig_Add_Wizard_SG_Powder
+ '''
+ ''' The configuration name
+ '''
Public ConfigName As String
+ '''
+ ''' The cal identifier
+ '''
Public CalID As Long
+ '''
+ ''' The cal name
+ '''
Public CalName As String
+ '''
+ ''' The gid
+ '''
Public GID As Long
+ '''
+ ''' The configuration identifier
+ '''
Public ConfigID As Long
+ '''
+ ''' From configuration wiz
+ '''
Public FromConfigWiz As Boolean
+ '''
+ ''' Handles the Load event of the frmConfig_Add_Wizard_SG_4 control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
Private Sub frmConfig_Add_Wizard_SG_4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call LoadData()
End Sub
+ '''
+ ''' Saves the data.
+ '''
Sub SaveData()
Try
Dim dCharge As Double = GeneralHelpers.FluffContent(txtCharge.Text, 0)
@@ -35,6 +65,11 @@ Public Class frmConfig_Add_Wizard_SG_Powder
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
End Try
End Sub
+ '''
+ ''' Determines whether [has perf powder] [the specified LNG identifier].
+ '''
+ ''' The LNG identifier.
+ ''' true if [has perf powder] [the specified LNG identifier]; otherwise, false.
Private Function HasPerfPowder(ByVal lngID As Long) As Boolean
Dim bAns As Boolean = False
Try
@@ -55,6 +90,9 @@ Public Class frmConfig_Add_Wizard_SG_Powder
End Try
Return bAns
End Function
+ '''
+ ''' Loads the data.
+ '''
Sub LoadData()
Try
Me.General_PowderTableAdapter.FillBy_Config_List(Me.MLLDataSet.General_Powder)
@@ -62,7 +100,11 @@ Public Class frmConfig_Add_Wizard_SG_Powder
Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
End Try
End Sub
-
+ '''
+ ''' Handles the Click event of the btnSave control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Call SaveData()
End Sub
diff --git a/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.Designer.vb b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.Designer.vb
new file mode 100644
index 0000000..c7ddcb9
--- /dev/null
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.Designer.vb
@@ -0,0 +1,39 @@
+Namespace Adding
+ _
+ Partial Class FrmCopyDataSheetCopyShotGun
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ 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.
+ _
+ Private Sub InitializeComponent()
+ Me.SuspendLayout()
+ '
+ 'frmCopy_DataSheet_Copy_ShotGun
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(284, 262)
+ Me.Name = "FrmCopyDataSheetCopyShotGun"
+ Me.Text = "frmCopy_DataSheet_Copy_ShotGun"
+ Me.ResumeLayout(False)
+
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/frmCopy_DataSheet_Copy_ShotGun.resx b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.resx
similarity index 97%
rename from BSMyLoadersLog/frmCopy_DataSheet_Copy_ShotGun.resx
rename to BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.resx
index 29dcb1b..1af7de1 100644
--- a/BSMyLoadersLog/frmCopy_DataSheet_Copy_ShotGun.resx
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.resx
@@ -1,120 +1,120 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.vb b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.vb
new file mode 100644
index 0000000..4815cf6
--- /dev/null
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_Copy_ShotGun.vb
@@ -0,0 +1,25 @@
+Namespace Adding
+ '''
+ ''' Class FrmCopyDataSheetCopyShotGun.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmCopyDataSheetCopyShotGun
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' The cfgid
+ '''
+ Public CFGID As Integer
+ '''
+ ''' Handles the Load event of the frmCopy_DataSheet_Copy_ShotGun control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmCopy_DataSheet_Copy_ShotGun_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
+ 'TODO: Finish the Copy Shotgun Copy Data Sheet Form
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.Designer.vb b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.Designer.vb
new file mode 100644
index 0000000..a404c57
--- /dev/null
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.Designer.vb
@@ -0,0 +1,440 @@
+Namespace Adding
+ _
+ Partial Class FrmCopyDataSheetRiflePistol
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ 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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmCopyDataSheetRiflePistol))
+ Me.txtCase = New System.Windows.Forms.TextBox
+ Me.txtPrimer = New System.Windows.Forms.TextBox
+ Me.txtBullet = New System.Windows.Forms.TextBox
+ Me.txtPowManu = New System.Windows.Forms.TextBox
+ Me.txtPowWei = New System.Windows.Forms.TextBox
+ Me.txtPowName = New System.Windows.Forms.TextBox
+ Me.Label14 = New System.Windows.Forms.Label
+ Me.Label13 = New System.Windows.Forms.Label
+ Me.Label12 = New System.Windows.Forms.Label
+ Me.Label11 = New System.Windows.Forms.Label
+ Me.Label10 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.nudYards = New System.Windows.Forms.NumericUpDown
+ Me.Label9 = New System.Windows.Forms.Label
+ Me.nudShots = New System.Windows.Forms.NumericUpDown
+ Me.Label8 = New System.Windows.Forms.Label
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.txtNotes = New System.Windows.Forms.TextBox
+ Me.txtLen = New System.Windows.Forms.TextBox
+ Me.txtCon = New System.Windows.Forms.TextBox
+ Me.txtGroup = New System.Windows.Forms.TextBox
+ Me.dtpTested = New System.Windows.Forms.DateTimePicker
+ Me.cmbFirearm = New System.Windows.Forms.ComboBox
+ Me.LoadersLogFirearmsBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.Label7 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Loaders_Log_FirearmsTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudShots, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'txtCase
+ '
+ Me.txtCase.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCase.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCase.Location = New System.Drawing.Point(132, 269)
+ Me.txtCase.Name = "txtCase"
+ Me.txtCase.Size = New System.Drawing.Size(200, 20)
+ Me.txtCase.TabIndex = 56
+ '
+ 'txtPrimer
+ '
+ Me.txtPrimer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrimer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrimer.Location = New System.Drawing.Point(132, 243)
+ Me.txtPrimer.Name = "txtPrimer"
+ Me.txtPrimer.Size = New System.Drawing.Size(200, 20)
+ Me.txtPrimer.TabIndex = 55
+ '
+ 'txtBullet
+ '
+ Me.txtBullet.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtBullet.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtBullet.Location = New System.Drawing.Point(132, 217)
+ Me.txtBullet.Name = "txtBullet"
+ Me.txtBullet.Size = New System.Drawing.Size(200, 20)
+ Me.txtBullet.TabIndex = 54
+ '
+ 'txtPowManu
+ '
+ Me.txtPowManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowManu.Location = New System.Drawing.Point(132, 191)
+ Me.txtPowManu.Name = "txtPowManu"
+ Me.txtPowManu.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowManu.TabIndex = 53
+ '
+ 'txtPowWei
+ '
+ Me.txtPowWei.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowWei.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowWei.Location = New System.Drawing.Point(132, 165)
+ Me.txtPowWei.Name = "txtPowWei"
+ Me.txtPowWei.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowWei.TabIndex = 52
+ '
+ 'txtPowName
+ '
+ Me.txtPowName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPowName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPowName.Location = New System.Drawing.Point(132, 140)
+ Me.txtPowName.Name = "txtPowName"
+ Me.txtPowName.Size = New System.Drawing.Size(200, 20)
+ Me.txtPowName.TabIndex = 51
+ '
+ 'Label14
+ '
+ Me.Label14.AutoSize = True
+ Me.Label14.Location = New System.Drawing.Point(12, 272)
+ Me.Label14.Name = "Label14"
+ Me.Label14.Size = New System.Drawing.Size(34, 13)
+ Me.Label14.TabIndex = 75
+ Me.Label14.Text = "Case:"
+ '
+ 'Label13
+ '
+ Me.Label13.AutoSize = True
+ Me.Label13.Location = New System.Drawing.Point(12, 246)
+ Me.Label13.Name = "Label13"
+ Me.Label13.Size = New System.Drawing.Size(39, 13)
+ Me.Label13.TabIndex = 74
+ Me.Label13.Text = "Primer:"
+ '
+ 'Label12
+ '
+ Me.Label12.AutoSize = True
+ Me.Label12.Location = New System.Drawing.Point(12, 220)
+ Me.Label12.Name = "Label12"
+ Me.Label12.Size = New System.Drawing.Size(36, 13)
+ Me.Label12.TabIndex = 73
+ Me.Label12.Text = "Bullet:"
+ '
+ 'Label11
+ '
+ Me.Label11.AutoSize = True
+ Me.Label11.Location = New System.Drawing.Point(12, 194)
+ Me.Label11.Name = "Label11"
+ Me.Label11.Size = New System.Drawing.Size(112, 13)
+ Me.Label11.TabIndex = 72
+ Me.Label11.Text = "Powder Manufacturer:"
+ '
+ 'Label10
+ '
+ Me.Label10.AutoSize = True
+ Me.Label10.Location = New System.Drawing.Point(12, 168)
+ Me.Label10.Name = "Label10"
+ Me.Label10.Size = New System.Drawing.Size(123, 13)
+ Me.Label10.TabIndex = 71
+ Me.Label10.Text = "Weight of Powder Used:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 143)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(77, 13)
+ Me.Label4.TabIndex = 70
+ Me.Label4.Text = "Powder Name:"
+ '
+ 'nudYards
+ '
+ Me.nudYards.Location = New System.Drawing.Point(132, 60)
+ Me.nudYards.Maximum = New Decimal(New Integer() {5000, 0, 0, 0})
+ Me.nudYards.Name = "nudYards"
+ Me.nudYards.Size = New System.Drawing.Size(200, 20)
+ Me.nudYards.TabIndex = 48
+ '
+ 'Label9
+ '
+ Me.Label9.AutoSize = True
+ Me.Label9.Location = New System.Drawing.Point(12, 62)
+ Me.Label9.Name = "Label9"
+ Me.Label9.Size = New System.Drawing.Size(81, 13)
+ Me.Label9.TabIndex = 69
+ Me.Label9.Text = "Yards tested at:"
+ '
+ 'nudShots
+ '
+ Me.nudShots.Location = New System.Drawing.Point(132, 114)
+ Me.nudShots.Maximum = New Decimal(New Integer() {1000, 0, 0, 0})
+ Me.nudShots.Name = "nudShots"
+ Me.nudShots.Size = New System.Drawing.Size(200, 20)
+ Me.nudShots.TabIndex = 50
+ '
+ 'Label8
+ '
+ Me.Label8.AutoSize = True
+ Me.Label8.Location = New System.Drawing.Point(12, 116)
+ Me.Label8.Name = "Label8"
+ Me.Label8.Size = New System.Drawing.Size(89, 13)
+ Me.Label8.TabIndex = 68
+ Me.Label8.Text = "Number of Shots:"
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(257, 454)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 61
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(15, 454)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 60
+ Me.btnAdd.Text = "Add"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'txtNotes
+ '
+ Me.txtNotes.Location = New System.Drawing.Point(15, 362)
+ Me.txtNotes.Multiline = True
+ Me.txtNotes.Name = "txtNotes"
+ Me.txtNotes.Size = New System.Drawing.Size(317, 84)
+ Me.txtNotes.TabIndex = 59
+ '
+ 'txtLen
+ '
+ Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLen.Location = New System.Drawing.Point(132, 321)
+ Me.txtLen.Name = "txtLen"
+ Me.txtLen.Size = New System.Drawing.Size(200, 20)
+ Me.txtLen.TabIndex = 58
+ '
+ 'txtCon
+ '
+ Me.txtCon.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtCon.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtCon.Location = New System.Drawing.Point(132, 295)
+ Me.txtCon.Name = "txtCon"
+ Me.txtCon.Size = New System.Drawing.Size(200, 20)
+ Me.txtCon.TabIndex = 57
+ '
+ 'txtGroup
+ '
+ Me.txtGroup.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtGroup.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtGroup.Location = New System.Drawing.Point(132, 86)
+ Me.txtGroup.Name = "txtGroup"
+ Me.txtGroup.Size = New System.Drawing.Size(200, 20)
+ Me.txtGroup.TabIndex = 49
+ '
+ 'dtpTested
+ '
+ Me.dtpTested.Location = New System.Drawing.Point(132, 33)
+ Me.dtpTested.Name = "dtpTested"
+ Me.dtpTested.Size = New System.Drawing.Size(200, 20)
+ Me.dtpTested.TabIndex = 47
+ '
+ 'cmbFirearm
+ '
+ Me.cmbFirearm.DataSource = Me.LoadersLogFirearmsBindingSource
+ Me.cmbFirearm.DisplayMember = "FullName"
+ Me.cmbFirearm.FormattingEnabled = True
+ Me.cmbFirearm.Location = New System.Drawing.Point(132, 6)
+ Me.cmbFirearm.Name = "cmbFirearm"
+ Me.cmbFirearm.Size = New System.Drawing.Size(200, 21)
+ Me.cmbFirearm.TabIndex = 46
+ Me.cmbFirearm.ValueMember = "ID"
+ '
+ 'LoadersLogFirearmsBindingSource
+ '
+ Me.LoadersLogFirearmsBindingSource.DataMember = "Loaders_Log_Firearms"
+ Me.LoadersLogFirearmsBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(12, 346)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(35, 13)
+ Me.Label7.TabIndex = 67
+ Me.Label7.Text = "Notes"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(12, 324)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(70, 13)
+ Me.Label6.TabIndex = 66
+ Me.Label6.Text = "Total Length:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 298)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(59, 13)
+ Me.Label5.TabIndex = 65
+ Me.Label5.Text = "Conditions:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 89)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(103, 13)
+ Me.Label3.TabIndex = 64
+ Me.Label3.Text = "Group size or Score:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 37)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(65, 13)
+ Me.Label2.TabIndex = 63
+ Me.Label2.Text = "Date tested:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(98, 13)
+ Me.Label1.TabIndex = 62
+ Me.Label1.Text = "Firearm tested with:"
+ '
+ 'Loaders_Log_FirearmsTableAdapter
+ '
+ Me.Loaders_Log_FirearmsTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmCopy_DataSheet_RiflePistol
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(348, 489)
+ Me.Controls.Add(Me.txtCase)
+ Me.Controls.Add(Me.txtPrimer)
+ Me.Controls.Add(Me.txtBullet)
+ Me.Controls.Add(Me.txtPowManu)
+ Me.Controls.Add(Me.txtPowWei)
+ Me.Controls.Add(Me.txtPowName)
+ Me.Controls.Add(Me.Label14)
+ Me.Controls.Add(Me.Label13)
+ Me.Controls.Add(Me.Label12)
+ Me.Controls.Add(Me.Label11)
+ Me.Controls.Add(Me.Label10)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.nudYards)
+ Me.Controls.Add(Me.Label9)
+ Me.Controls.Add(Me.nudShots)
+ Me.Controls.Add(Me.Label8)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.txtNotes)
+ Me.Controls.Add(Me.txtLen)
+ Me.Controls.Add(Me.txtCon)
+ Me.Controls.Add(Me.txtGroup)
+ Me.Controls.Add(Me.dtpTested)
+ Me.Controls.Add(Me.cmbFirearm)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Copy Loaders Log Entry")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Copy Loaders Log Entry")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmCopyDataSheetRiflePistol"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Copy Loaders Log Entry"
+ CType(Me.nudYards, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudShots, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.LoadersLogFirearmsBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+ Friend WithEvents txtCase As System.Windows.Forms.TextBox
+ Friend WithEvents txtPrimer As System.Windows.Forms.TextBox
+ Friend WithEvents txtBullet As System.Windows.Forms.TextBox
+ Friend WithEvents txtPowManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtPowWei As System.Windows.Forms.TextBox
+ Friend WithEvents txtPowName As System.Windows.Forms.TextBox
+ Friend WithEvents Label14 As System.Windows.Forms.Label
+ Friend WithEvents Label13 As System.Windows.Forms.Label
+ Friend WithEvents Label12 As System.Windows.Forms.Label
+ Friend WithEvents Label11 As System.Windows.Forms.Label
+ Friend WithEvents Label10 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents nudYards As System.Windows.Forms.NumericUpDown
+ Friend WithEvents Label9 As System.Windows.Forms.Label
+ Friend WithEvents nudShots As System.Windows.Forms.NumericUpDown
+ Friend WithEvents Label8 As System.Windows.Forms.Label
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents txtNotes As System.Windows.Forms.TextBox
+ Friend WithEvents txtLen As System.Windows.Forms.TextBox
+ Friend WithEvents txtCon As System.Windows.Forms.TextBox
+ Friend WithEvents txtGroup As System.Windows.Forms.TextBox
+ Friend WithEvents dtpTested As System.Windows.Forms.DateTimePicker
+ Friend WithEvents cmbFirearm As System.Windows.Forms.ComboBox
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents LoadersLogFirearmsBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents Loaders_Log_FirearmsTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.Loaders_Log_FirearmsTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/frmCopy_DataSheet_RiflePistol.resx b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.resx
similarity index 98%
rename from BSMyLoadersLog/frmCopy_DataSheet_RiflePistol.resx
rename to BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.resx
index 6ea37d6..06ea66c 100644
--- a/BSMyLoadersLog/frmCopy_DataSheet_RiflePistol.resx
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.resx
@@ -1,152 +1,152 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 128, 17
-
-
- 17, 17
-
-
- 351, 17
-
-
- 17, 54
-
-
-
-
- AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAADJ0dN+fY6BgZWDgpCXl5urq6vDy83I0NLK09TR3uAAAAAAAAAAAAAAAAAAAAAAAADCysx8
- fJbt7e3q6e3Pzt20s8mfn7KUlKWMi6CCgpeAgI+UlJnO290AAAAAAAAAAACmpqdISIi2t7/U1NXf39/l
- 5eXq6urq6urt7e3u7u7s7O7V1OKxub8AAAAAAAAAAACNjZQ5OIM5OJg+PpZLSpNeXph1daCOjq2nqLrB
- wcjU1NTf39/ExMQAAAAAAAAAAAB4d4suLIBEQqVDQaM+PJw6OJU1M44zMYozMYs1M4w8O5BOTZVqaZIA
- AAAAAADR3uBmZYcxL4ZGQ6hDQaU/Pp48Opg4NpI3NY83NZA6OJQ+PJtBP6FjYpYAAAAAAADJ0tNRUHs1
- M49HRatFQ6hCP6I/PZ08Opk7OZY7OZc+PJpAPp9CQKOCgaYAAAAAAADFzc8+PXQ7OZlIRq1GRKtEQqdC
- QKNAPp8/Pp4/Pp9BQKFDQaVDQaSmrr4AAAAAAAC0uLk3NXxAPaJJR65IRq1HRKtFQ6hEQqZEQqVEQqVE
- QqdGRKpFQ6TBys0AAAAAAACWlps3NYVEQahIRq1IRq1IRq1HRqxHRaxHRatHRatHRaxIRq1TUp8AAAAA
- AAAAAACBgI83NYxLSa9JR65IRq1JR65IRq1JR65IRq1JR65IRq1JR61raqIAAAAAAAAAAAB7e5Y3NJFQ
- TrJJR65IRq1IRq1IRq1IRq1IRq1IRq1IRq1IRq2NkboAAAAAAAAAAACCgaA+PJxUUrZUUrVUUbRTUbJT
- UbJTULFRT7JLSa5IRq1IRq2pscEAAAAAAAAAAACnr7tFQqhPTLlPTLlPTLlPTLlOS7hOS7ZOS7VUUbdV
- UrVVU7LDzM4AAAAAAAAAAADR3uCkrMWRlMR2da1jYadXVK9PTLdPS7hPTLhPTLlPTLlcWqoAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAADFzdCxucOiqsGSlcOEgrqTkbUAAAAAAAAAAADADwAAwAEAAMAB
- AADAAQAAwAEAAIABAACAAQAAgAEAAIABAACAAwAAgAMAAIADAACAAwAAgAMAAIAHAAD+BwAA
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 128, 17
+
+
+ 17, 17
+
+
+ 351, 17
+
+
+ 17, 54
+
+
+
+
+ AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAADJ0dN+fY6BgZWDgpCXl5urq6vDy83I0NLK09TR3uAAAAAAAAAAAAAAAAAAAAAAAADCysx8
+ fJbt7e3q6e3Pzt20s8mfn7KUlKWMi6CCgpeAgI+UlJnO290AAAAAAAAAAACmpqdISIi2t7/U1NXf39/l
+ 5eXq6urq6urt7e3u7u7s7O7V1OKxub8AAAAAAAAAAACNjZQ5OIM5OJg+PpZLSpNeXph1daCOjq2nqLrB
+ wcjU1NTf39/ExMQAAAAAAAAAAAB4d4suLIBEQqVDQaM+PJw6OJU1M44zMYozMYs1M4w8O5BOTZVqaZIA
+ AAAAAADR3uBmZYcxL4ZGQ6hDQaU/Pp48Opg4NpI3NY83NZA6OJQ+PJtBP6FjYpYAAAAAAADJ0tNRUHs1
+ M49HRatFQ6hCP6I/PZ08Opk7OZY7OZc+PJpAPp9CQKOCgaYAAAAAAADFzc8+PXQ7OZlIRq1GRKtEQqdC
+ QKNAPp8/Pp4/Pp9BQKFDQaVDQaSmrr4AAAAAAAC0uLk3NXxAPaJJR65IRq1HRKtFQ6hEQqZEQqVEQqVE
+ QqdGRKpFQ6TBys0AAAAAAACWlps3NYVEQahIRq1IRq1IRq1HRqxHRaxHRatHRatHRaxIRq1TUp8AAAAA
+ AAAAAACBgI83NYxLSa9JR65IRq1JR65IRq1JR65IRq1JR65IRq1JR61raqIAAAAAAAAAAAB7e5Y3NJFQ
+ TrJJR65IRq1IRq1IRq1IRq1IRq1IRq1IRq1IRq2NkboAAAAAAAAAAACCgaA+PJxUUrZUUrVUUbRTUbJT
+ UbJTULFRT7JLSa5IRq1IRq2pscEAAAAAAAAAAACnr7tFQqhPTLlPTLlPTLlPTLlOS7hOS7ZOS7VUUbdV
+ UrVVU7LDzM4AAAAAAAAAAADR3uCkrMWRlMR2da1jYadXVK9PTLdPS7hPTLhPTLlPTLlcWqoAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAADFzdCxucOiqsGSlcOEgrqTkbUAAAAAAAAAAADADwAAwAEAAMAB
+ AADAAQAAwAEAAIABAACAAQAAgAEAAIABAACAAwAAgAMAAIADAACAAwAAgAMAAIAHAAD+BwAA
+
+
\ No newline at end of file
diff --git a/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.vb b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.vb
new file mode 100644
index 0000000..d7ca567
--- /dev/null
+++ b/BSMyLoadersLog/Adding/frmCopy_DataSheet_RiflePistol.vb
@@ -0,0 +1,125 @@
+Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.LoadersLog
+Imports BurnSoft.Applications.MLL.Types
+
+Namespace Adding
+ '''
+ ''' Class FrmCopyDataSheetRiflePistol.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmCopyDataSheetRiflePistol
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ '''
+ ''' Loads the data.
+ '''
+ '''
+ Sub LoadData()
+ Try
+ Loaders_Log_FirearmsTableAdapter.Fill(MLLDataSet.Loaders_Log_Firearms)
+ Dim strSplit() As String
+ Dim lst As List(Of LoadersLogMetallicData) = LoadersLogMetallic.GetDetails(DatabasePath, ConfigId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As LoadersLogMetallicData In lst
+ cmbFirearm.SelectedValue = o.FirearmId
+ dtpTested.Value = o.DateCreated
+ txtGroup.Text = o.GroupSize
+ nudShots.Value = o.NumberOfShots
+ nudYards.Value = o.Yards
+ strSplit = Split(o.PowderDetails, " - ")
+ txtPowName.Text = Trim(strSplit(0))
+ txtPowWei.Text = Trim(strSplit(1))
+ txtPowManu.Text = Trim(strSplit(2))
+ txtBullet.Text = o.BulletDetails
+ txtPrimer.Text = o.PrimerDetails
+ txtCase.Text = o.CaseDetails
+ txtCon.Text = o.Conditions
+ txtLen.Text = o.TotalLenght
+ txtNotes.Text = o.Notes
+ Next
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ '''
+ Sub SaveData()
+ Try
+ Dim firearmId As Long = cmbFirearm.SelectedValue
+ Dim firearmName As String = cmbFirearm.Text
+ Dim dateCreated As String = dtpTested.Value
+ Dim groupSize As String = GeneralHelpers.FluffContent(txtGroup.Text)
+ Dim numShots As Long = nudShots.Value
+ Dim yards As Long = nudYards.Value
+ Dim powderName As String = GeneralHelpers.FluffContent(txtPowName.Text)
+ Dim powderWeight As String = GeneralHelpers.FluffContent(txtPowWei.Text)
+ Dim powderManufacturer As String = GeneralHelpers.FluffContent(txtPowManu.Text)
+ Dim bulletDetails As String = GeneralHelpers.FluffContent(txtBullet.Text)
+ Dim primerDetails As String = GeneralHelpers.FluffContent(txtPrimer.Text)
+ Dim caseDetails As String = GeneralHelpers.FluffContent(txtCase.Text)
+ Dim condition As String = GeneralHelpers.FluffContent(txtCon.Text)
+ Dim oal As String = GeneralHelpers.FluffContent(txtLen.Text)
+ Dim notes As String = GeneralHelpers.FluffContent(txtNotes.Text)
+ Dim configName As String = "N/A"
+ Dim barrelLenght As String = ""
+ Dim caliber As String = ""
+
+ Dim lst As List(Of FirearmCollection) = Firearms.GetDetails(DatabasePath, CInt(firearmId), _errOut)
+ For Each o As FirearmCollection In lst
+ caliber = o.Caliber
+ barrelLenght = o.Barrel
+ Next
+
+ If Not LoadersLogMetallic.Add(DatabasePath, firearmId, dateCreated, CInt(yards), groupSize,
+ CInt(numShots), $"{powderName} - {powderWeight} - {powderManufacturer}",
+ bulletDetails, primerDetails, caseDetails, condition, oal, notes,
+ configName, firearmName, caliber, barrelLenght,
+ _errOut) Then Throw New Exception(_errOut)
+
+ MsgBox("Information was saved to the Loaders Log!")
+ If FromView Then Call FrmViewDataSheetRiflePistols.LoadDataCur()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmCopy_DataSheet_RiflePistol control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmCopy_DataSheet_RiflePistol_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/BSMyLoadersLog.vbproj b/BSMyLoadersLog/BSMyLoadersLog.vbproj
index ddd6673..7f0c8f5 100644
--- a/BSMyLoadersLog/BSMyLoadersLog.vbproj
+++ b/BSMyLoadersLog/BSMyLoadersLog.vbproj
@@ -63,7 +63,7 @@
My Project\app.manifest
- true
+ false
7A8EC588D285191AC5FC7F2E2C6E784F539770C2
@@ -72,8 +72,11 @@
http://timestamp.verisign.com/scripts/timstamp.dll
-
- ..\packages\BurnSoft.Applications.MLL.3.0.3.61-beta\lib\net481\BurnSoft.Applications.MLL.dll
+
+ ..\packages\BurnSoft.Applications.MGC.1.7.16.59-beta\lib\net481\BurnSoft.Applications.MGC.dll
+
+
+ ..\packages\BurnSoft.Applications.MLL.3.0.3.79-beta\lib\net481\BurnSoft.Applications.MLL.dll
False
@@ -174,10 +177,10 @@
Form
-
+
frmCopy_DataSheet_Copy_ShotGun.vb
-
+
Form
@@ -380,10 +383,10 @@
Form
-
+
frmCopy_DataSheet_RiflePistol.vb
-
+
Form
@@ -518,10 +521,10 @@
Form
-
- frmLoadMakeReady_Details.vb
+
+ FrmLoadMakeReadyDetails.vb
-
+
Form
@@ -820,7 +823,7 @@
frmAddQtyHulls.vb
-
+
frmCopy_DataSheet_Copy_ShotGun.vb
@@ -963,7 +966,7 @@
Designer
frmConfig_Add_Wizard_SG_Powder.vb
-
+
Designer
frmCopy_DataSheet_RiflePistol.vb
@@ -1055,9 +1058,9 @@
Designer
frmImportFirearms.vb
-
+
Designer
- frmLoadMakeReady_Details.vb
+ FrmLoadMakeReadyDetails.vb
Designer
@@ -1241,6 +1244,7 @@
+
diff --git a/BSMyLoadersLog/BurnSoft.Applications.MGC.chm b/BSMyLoadersLog/BurnSoft.Applications.MGC.chm
new file mode 100644
index 0000000..5eff5ef
Binary files /dev/null and b/BSMyLoadersLog/BurnSoft.Applications.MGC.chm differ
diff --git a/BSMyLoadersLog/BurnSoft.Applications.MLL.chm b/BSMyLoadersLog/BurnSoft.Applications.MLL.chm
index fcba7cc..d7065cd 100644
Binary files a/BSMyLoadersLog/BurnSoft.Applications.MLL.chm and b/BSMyLoadersLog/BurnSoft.Applications.MLL.chm differ
diff --git a/BSMyLoadersLog/DBBackup/MLL.mdb b/BSMyLoadersLog/DBBackup/v1.0/MLL.mdb
similarity index 92%
rename from BSMyLoadersLog/DBBackup/MLL.mdb
rename to BSMyLoadersLog/DBBackup/v1.0/MLL.mdb
index 241b79c..cd19bec 100644
Binary files a/BSMyLoadersLog/DBBackup/MLL.mdb and b/BSMyLoadersLog/DBBackup/v1.0/MLL.mdb differ
diff --git a/BSMyLoadersLog/DBBackup/v2.1/MLL.mdb b/BSMyLoadersLog/DBBackup/v2.1/MLL.mdb
new file mode 100644
index 0000000..d8f5a2e
Binary files /dev/null and b/BSMyLoadersLog/DBBackup/v2.1/MLL.mdb differ
diff --git a/BSMyLoadersLog/DBBackup/v2.2/MLL.mdb b/BSMyLoadersLog/DBBackup/v2.2/MLL.mdb
new file mode 100644
index 0000000..b995575
Binary files /dev/null and b/BSMyLoadersLog/DBBackup/v2.2/MLL.mdb differ
diff --git a/BSMyLoadersLog/Editing/frmEditBullets.vb b/BSMyLoadersLog/Editing/frmEditBullets.vb
index b383689..5357b25 100644
--- a/BSMyLoadersLog/Editing/frmEditBullets.vb
+++ b/BSMyLoadersLog/Editing/frmEditBullets.vb
@@ -41,7 +41,7 @@ Public Class frmEditBullets
If Not IsDBNull(RS("ePPB")) Then eppo = RS("ePPB")
dPrice = eppo * iQty
nudQty.Value = iQty
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
+ txtPrice.Text = Converters.ConvertToDollars(dPrice)
End While
RS.Close()
RS = Nothing
@@ -99,7 +99,7 @@ Public Class frmEditBullets
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Try
Call SaveData()
- If FromView Then Call frmView_List_Bullets.LoadData()
+ If FromView Then Call FrmViewListBullets.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "btnAdd.Click", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditBushing_Powder.vb b/BSMyLoadersLog/Editing/frmEditBushing_Powder.vb
index e9ff5a3..b285b73 100644
--- a/BSMyLoadersLog/Editing/frmEditBushing_Powder.vb
+++ b/BSMyLoadersLog/Editing/frmEditBushing_Powder.vb
@@ -1,8 +1,13 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
Public Class frmEditBushing_Powder
+ '''
+ ''' The error out
+ '''
+ Dim errOut as String
Public CID As Long
Sub LoadData()
Try
@@ -30,10 +35,16 @@ Public Class frmEditBushing_Powder
End Sub
Sub PreloadData()
Try
- Dim Objaf As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_Manufacturer
- txtName.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_Name
- txtCharge.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_sCharge
+ 'Dim Objaf As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_Manufacturer
+ 'txtName.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_Name
+ 'txtCharge.AutoCompleteCustomSource = Objaf.List_SG_Bushings_Powder_sCharge
+ txtManu.AutoCompleteCustomSource = ConfigShotgun.BushingPowderManufacturer(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
+ txtName.AutoCompleteCustomSource = ConfigShotgun.BushingPowderName(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
+ txtCharge.AutoCompleteCustomSource = ConfigShotgun.BushingPowderCharge(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
Catch ex As Exception
Call LogError(Me.Name, "PreloadData", Err.Number, ex.Message.ToString)
End Try
diff --git a/BSMyLoadersLog/Editing/frmEditBushing_Shot.vb b/BSMyLoadersLog/Editing/frmEditBushing_Shot.vb
index b62cbbf..b54a769 100644
--- a/BSMyLoadersLog/Editing/frmEditBushing_Shot.vb
+++ b/BSMyLoadersLog/Editing/frmEditBushing_Shot.vb
@@ -1,8 +1,13 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
Public Class frmEditBushing_Shot
+ '''
+ ''' The error out
+ '''
+ Dim errOut as String
Public CID As Long
Sub LoadData()
Dim Obj As New BSDatabase
@@ -25,10 +30,16 @@ Public Class frmEditBushing_Shot
End Sub
Sub PreLoadData()
Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtCharge.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_sCharge
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_Name
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtCharge.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_sCharge
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_Manufacturer
+ 'txtName.AutoCompleteCustomSource = ObjAF.List_SG_Bushings_Shot_Name
+ txtCharge.AutoCompleteCustomSource = ConfigShotgun.BushingShotCharge(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
+ txtManu.AutoCompleteCustomSource = ConfigShotgun.BushingShotManufacturer(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
+ txtName.AutoCompleteCustomSource = ConfigShotgun.BushingShotName(DatabasePath, errOut)
+ If errOut.Length > 0 Then Throw New Exception(errOut)
Catch ex As Exception
Call LogError(Me.Name, "PreLoadData", Err.Number, ex.Message.ToString)
End Try
diff --git a/BSMyLoadersLog/Editing/frmEditDataSheet_RiflePistols.vb b/BSMyLoadersLog/Editing/frmEditDataSheet_RiflePistols.vb
index 88c15b9..8832609 100644
--- a/BSMyLoadersLog/Editing/frmEditDataSheet_RiflePistols.vb
+++ b/BSMyLoadersLog/Editing/frmEditDataSheet_RiflePistols.vb
@@ -1,7 +1,7 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BurnSoft.Applications.MLL.Helpers
-
+Imports BSMyLoadersLog.Viewing
Public Class frmEditDataSheet_RiflePistols
Public CFGID As Long
Public FromView As Boolean
@@ -67,7 +67,7 @@ Public Class frmEditDataSheet_RiflePistols
"',BarrelLen='" & strBarLen & "' where ID=" & CFGID
Obj.ConnExec(Sql)
MsgBox("Information was saved to the Loaders Log!")
- If FromView Then Call frmViewDataSheet_RiflePistols.LoadDataCur()
+ If FromView Then Call FrmViewDataSheetRiflePistols.LoadDataCur()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditEquipment.vb b/BSMyLoadersLog/Editing/frmEditEquipment.vb
index 63fcdb0..43551a1 100644
--- a/BSMyLoadersLog/Editing/frmEditEquipment.vb
+++ b/BSMyLoadersLog/Editing/frmEditEquipment.vb
@@ -1,6 +1,7 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BurnSoft.Applications.MLL.Helpers
+Imports BSMyLoadersLog.Viewing
Public Class frmEditEquipment
Public EID As Long
@@ -46,7 +47,7 @@ Public Class frmEditEquipment
"Use='" & strUse & "', Cost=" & strPrice & ", Notes='" & strNotes & "' where ID=" & EID
Obj.ConnExec(SQL)
Obj = Nothing
- If FromView Then Call frmView_List_Equipment.LoadData()
+ If FromView Then Call FrmViewListEquipment.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditFirearm.vb b/BSMyLoadersLog/Editing/frmEditFirearm.vb
index 203b596..a2184c4 100644
--- a/BSMyLoadersLog/Editing/frmEditFirearm.vb
+++ b/BSMyLoadersLog/Editing/frmEditFirearm.vb
@@ -1,6 +1,7 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BurnSoft.Applications.MLL.Helpers
+Imports BSMyLoadersLog.Viewing
Public Class frmEditFirearm
Public FID As Long
@@ -56,7 +57,7 @@ Public Class frmEditFirearm
",SerialNo='" & strSerial & "',GType='" & strType & "',exclude=" & iExclude & _
" where ID=" & FID
Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Firearms.LoadData()
+ If FromView Then Call FrmViewListFirearms.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditHulls.Designer.vb b/BSMyLoadersLog/Editing/frmEditHulls.Designer.vb
index cee8c6d..4c9389f 100644
--- a/BSMyLoadersLog/Editing/frmEditHulls.Designer.vb
+++ b/BSMyLoadersLog/Editing/frmEditHulls.Designer.vb
@@ -1,268 +1,270 @@
- _
-Partial Class frmEditHulls
- Inherits System.Windows.Forms.Form
+Namespace Editing
+ _
+ Partial Class FrmEditHulls
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEditHulls))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnAdd = New System.Windows.Forms.Button
- Me.cmbGauge = New System.Windows.Forms.ComboBox
- Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.txtLen = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.Label6 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- Me.txtDRAM = New System.Windows.Forms.TextBox
- Me.Label7 = New System.Windows.Forms.Label
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.Location = New System.Drawing.Point(168, 212)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 22
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnAdd
- '
- Me.btnAdd.Location = New System.Drawing.Point(30, 212)
- Me.btnAdd.Name = "btnAdd"
- Me.btnAdd.Size = New System.Drawing.Size(75, 23)
- Me.btnAdd.TabIndex = 21
- Me.btnAdd.Text = "Update"
- Me.btnAdd.UseVisualStyleBackColor = True
- '
- 'cmbGauge
- '
- Me.cmbGauge.DataSource = Me.ListSGGaugeBindingSource
- Me.cmbGauge.DisplayMember = "ga"
- Me.cmbGauge.FormattingEnabled = True
- Me.cmbGauge.Location = New System.Drawing.Point(104, 71)
- Me.cmbGauge.Name = "cmbGauge"
- Me.cmbGauge.Size = New System.Drawing.Size(167, 21)
- Me.cmbGauge.TabIndex = 15
- Me.cmbGauge.ValueMember = "ID"
- '
- 'ListSGGaugeBindingSource
- '
- Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
- Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(105, 150)
- Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(167, 20)
- Me.nudQty.TabIndex = 19
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(105, 176)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(167, 20)
- Me.txtPrice.TabIndex = 20
- '
- 'txtLen
- '
- Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtLen.Location = New System.Drawing.Point(104, 98)
- Me.txtLen.Name = "txtLen"
- Me.txtLen.Size = New System.Drawing.Size(167, 20)
- Me.txtLen.TabIndex = 17
- '
- 'txtName
- '
- Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(104, 45)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(167, 20)
- Me.txtName.TabIndex = 12
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(104, 19)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(167, 20)
- Me.txtManu.TabIndex = 10
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(13, 179)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(34, 13)
- Me.Label6.TabIndex = 18
- Me.Label6.Text = "Price:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(13, 152)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(26, 13)
- Me.Label5.TabIndex = 16
- Me.Label5.Text = "Qty."
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 101)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(43, 13)
- Me.Label4.TabIndex = 14
- Me.Label4.Text = "Length:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 74)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 13
- Me.Label3.Text = "Gauge:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 48)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 11
- Me.Label2.Text = "Name:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 19)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 9
- Me.Label1.Text = "Manufacturer:"
- '
- 'List_SG_GaugeTableAdapter
- '
- Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'txtDRAM
- '
- Me.txtDRAM.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtDRAM.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtDRAM.Location = New System.Drawing.Point(105, 124)
- Me.txtDRAM.Name = "txtDRAM"
- Me.txtDRAM.Size = New System.Drawing.Size(167, 20)
- Me.txtDRAM.TabIndex = 23
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(13, 124)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(42, 13)
- Me.Label7.TabIndex = 24
- Me.Label7.Text = "DRAM:"
- '
- 'frmEditHulls
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(288, 250)
- Me.Controls.Add(Me.txtDRAM)
- Me.Controls.Add(Me.Label7)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnAdd)
- Me.Controls.Add(Me.cmbGauge)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.txtLen)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmEditHulls"
- Me.Text = "Edit Shotshell Hulls"
- CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEditHulls))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnAdd = New System.Windows.Forms.Button
+ Me.cmbGauge = New System.Windows.Forms.ComboBox
+ Me.ListSGGaugeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.txtLen = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.List_SG_GaugeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ Me.txtDRAM = New System.Windows.Forms.TextBox
+ Me.Label7 = New System.Windows.Forms.Label
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.Location = New System.Drawing.Point(168, 212)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 22
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnAdd
+ '
+ Me.btnAdd.Location = New System.Drawing.Point(30, 212)
+ Me.btnAdd.Name = "btnAdd"
+ Me.btnAdd.Size = New System.Drawing.Size(75, 23)
+ Me.btnAdd.TabIndex = 21
+ Me.btnAdd.Text = "Update"
+ Me.btnAdd.UseVisualStyleBackColor = True
+ '
+ 'cmbGauge
+ '
+ Me.cmbGauge.DataSource = Me.ListSGGaugeBindingSource
+ Me.cmbGauge.DisplayMember = "ga"
+ Me.cmbGauge.FormattingEnabled = True
+ Me.cmbGauge.Location = New System.Drawing.Point(104, 71)
+ Me.cmbGauge.Name = "cmbGauge"
+ Me.cmbGauge.Size = New System.Drawing.Size(167, 21)
+ Me.cmbGauge.TabIndex = 15
+ Me.cmbGauge.ValueMember = "ID"
+ '
+ 'ListSGGaugeBindingSource
+ '
+ Me.ListSGGaugeBindingSource.DataMember = "List_SG_Gauge"
+ Me.ListSGGaugeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(105, 150)
+ Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(167, 20)
+ Me.nudQty.TabIndex = 19
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(105, 176)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(167, 20)
+ Me.txtPrice.TabIndex = 20
+ '
+ 'txtLen
+ '
+ Me.txtLen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtLen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtLen.Location = New System.Drawing.Point(104, 98)
+ Me.txtLen.Name = "txtLen"
+ Me.txtLen.Size = New System.Drawing.Size(167, 20)
+ Me.txtLen.TabIndex = 17
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(104, 45)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(167, 20)
+ Me.txtName.TabIndex = 12
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(104, 19)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(167, 20)
+ Me.txtManu.TabIndex = 10
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(13, 179)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(34, 13)
+ Me.Label6.TabIndex = 18
+ Me.Label6.Text = "Price:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(13, 152)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(26, 13)
+ Me.Label5.TabIndex = 16
+ Me.Label5.Text = "Qty."
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 101)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(43, 13)
+ Me.Label4.TabIndex = 14
+ Me.Label4.Text = "Length:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 74)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 13
+ Me.Label3.Text = "Gauge:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 48)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 11
+ Me.Label2.Text = "Name:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 19)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 9
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'List_SG_GaugeTableAdapter
+ '
+ Me.List_SG_GaugeTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'txtDRAM
+ '
+ Me.txtDRAM.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtDRAM.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtDRAM.Location = New System.Drawing.Point(105, 124)
+ Me.txtDRAM.Name = "txtDRAM"
+ Me.txtDRAM.Size = New System.Drawing.Size(167, 20)
+ Me.txtDRAM.TabIndex = 23
+ '
+ 'Label7
+ '
+ Me.Label7.AutoSize = True
+ Me.Label7.Location = New System.Drawing.Point(13, 124)
+ Me.Label7.Name = "Label7"
+ Me.Label7.Size = New System.Drawing.Size(42, 13)
+ Me.Label7.TabIndex = 24
+ Me.Label7.Text = "DRAM:"
+ '
+ 'frmEditHulls
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(288, 250)
+ Me.Controls.Add(Me.txtDRAM)
+ Me.Controls.Add(Me.Label7)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnAdd)
+ Me.Controls.Add(Me.cmbGauge)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.txtLen)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmEditHulls"
+ Me.Text = "Edit Shotshell Hulls"
+ CType(Me.ListSGGaugeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnAdd As System.Windows.Forms.Button
- Friend WithEvents cmbGauge As System.Windows.Forms.ComboBox
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtLen As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
- Friend WithEvents txtDRAM As System.Windows.Forms.TextBox
- Friend WithEvents Label7 As System.Windows.Forms.Label
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnAdd As System.Windows.Forms.Button
+ Friend WithEvents cmbGauge As System.Windows.Forms.ComboBox
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents txtLen As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents ListSGGaugeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents List_SG_GaugeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.List_SG_GaugeTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ Friend WithEvents txtDRAM As System.Windows.Forms.TextBox
+ Friend WithEvents Label7 As System.Windows.Forms.Label
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Editing/frmEditHulls.vb b/BSMyLoadersLog/Editing/frmEditHulls.vb
index 5e4c876..b299919 100644
--- a/BSMyLoadersLog/Editing/frmEditHulls.vb
+++ b/BSMyLoadersLog/Editing/frmEditHulls.vb
@@ -1,99 +1,165 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.AutoFill
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmEditHulls
- Public SID As Integer
- Public FromView As Boolean
- Sub AutoLoad()
- Try
- Dim ObjAF As New AutoFillCollections.ShotGun
- txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Case_Manufacturer
- txtName.AutoCompleteCustomSource = ObjAF.List_SG_Case_Name
- txtLen.AutoCompleteCustomSource = ObjAF.List_SG_Case_Length
- txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_Case_Price
- txtDRAM.AutoCompleteCustomSource = ObjAF.List_SG_Case_DRAM
- Catch ex As Exception
- Call LogError(Me.Name, "utoLoad", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub Loaddata()
- Try
- Me.List_SG_GaugeTableAdapter.Fill(Me.MLLDataSet.List_SG_Gauge)
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from List_SG_Case where ID=" & SID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim TimesUsed As Long = 0
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("GID")) Then
- cmbGauge.SelectedValue = RS("GID")
+Namespace Editing
+ ' TODO: #20 clean up code
+ '''
+ ''' Class frmEditHulls.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmEditHulls
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The hull identifier
+ '''
+ Public HullId As Integer
+ '''
+ ''' From view
+ '''
+ Public FromView As Boolean
+ Sub AutoLoad()
+ Try
+ 'Dim ObjAF As New AutoFillCollections.ShotGun
+ 'txtManu.AutoCompleteCustomSource = ObjAF.List_SG_Case_Manufacturer
+ 'txtName.AutoCompleteCustomSource = ObjAF.List_SG_Case_Name
+ 'txtLen.AutoCompleteCustomSource = ObjAF.List_SG_Case_Length
+ 'txtPrice.AutoCompleteCustomSource = ObjAF.List_SG_Case_Price
+ 'txtDRAM.AutoCompleteCustomSource = ObjAF.List_SG_Case_DRAM
+ txtManu.AutoCompleteCustomSource = GeneralShotgun.CaseManufacturer(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtName.AutoCompleteCustomSource = GeneralShotgun.CaseName(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtLen.AutoCompleteCustomSource = GeneralShotgun.Length(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtPrice.AutoCompleteCustomSource = GeneralShotgun.Price(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ txtDRAM.AutoCompleteCustomSource = GeneralShotgun.Dram(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Catch ex As Exception
+ Call LogError(Name, "AutoLoad", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Loaddatas this instance.
+ '''
+ Sub Loaddata()
+ Try
+ List_SG_GaugeTableAdapter.Fill(MLLDataSet.List_SG_Gauge)
+ Dim lst As List(Of ShotgunHullData) = ShotgunHullInventory.GetDetails(DatabasePath, HullId, _errOut)
+ If _errOut.Length > 0 Then Throw new Exception(_errOut)
+ For Each o As ShotgunHullData In lst
+ cmbGauge.SelectedValue = o.GunId
cmbGauge.Update()
- End If
- If Not IsDBNull(RS("Manufacturer")) Then txtManu.Text = GeneralHelpers.UnFluffContent(RS("Manufacturer"))
- If Not IsDBNull(RS("Name")) Then txtName.Text = GeneralHelpers.UnFluffContent(RS("Name"))
- If Not IsDBNull(RS("Length")) Then txtLen.Text = GeneralHelpers.UnFluffContent(RS("Length"))
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("epps")) Then eppo = RS("epps")
- If Not IsDBNull(RS("DRAM")) Then txtDRAM.Text = GeneralHelpers.UnFluffContent(RS("DRAM"))
- dPrice = eppo * iQty
- nudQty.Value = iQty
- Dim ObjIM As New InventoryMath
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "LoadData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim strlen As String = GeneralHelpers.FluffContent(txtLen.Text)
- Dim intQty As Integer = nudQty.Value
- Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
- Dim sDRAM As String = GeneralHelpers.FluffContent(txtDRAM.Text)
- Dim LngGAID As Long = cmbGauge.SelectedValue
- Dim sGauge As String = cmbGauge.Text
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strlen, "Length", Me.Text) Then Exit Sub
- Dim EstCostPerItem As Double = 0
- If dbPrice <> 0 And intQty > 0 Then
- EstCostPerItem = (dbPrice / intQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "UPDATE List_SG_Case set Manufacturer='" & strManu & "',Name='" & strName & "'" & _
- ",Length='" & strlen & "',Gauge='" & sGauge & "', epps=" & EstCostPerItem & ", " & _
- "Qty=" & intQty & ",Price=" & dbPrice & ",GID=" & LngGAID & _
- ", DRAM='" & sDRAM & "' where id=" & SID
- Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_ShellHulls.LoadData()
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmEditHulls_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Call AutoLoad()
- Call Loaddata()
- End Sub
+ txtManu.Text = GeneralHelpers.UnFluffContent(o.Manufacturer)
+ txtName.Text = GeneralHelpers.UnFluffContent(o.Name)
+ txtLen.Text = GeneralHelpers.UnFluffContent(o.Length)
+ txtDRAM.Text = GeneralHelpers.UnFluffContent(o.DRAM)
+ nudQty.Value = o.Qty
+ txtPrice.Text = Converters.ConvertToDollars(o.Qty * o.EstimatedPricePerItem)
+ Next
+ 'Dim Obj As New BSDatabase
+ 'Call Obj.ConnectDB()
+ 'Dim SQL As String = "SELECT * from List_SG_Case where ID=" & HullId
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim TimesUsed As Long = 0
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim dPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("GID")) Then
+ ' cmbGauge.SelectedValue = RS("GID")
+ ' cmbGauge.Update()
+ ' End If
+ ' If Not IsDBNull(RS("Manufacturer")) Then txtManu.Text = GeneralHelpers.UnFluffContent(RS("Manufacturer"))
+ ' If Not IsDBNull(RS("Name")) Then txtName.Text = GeneralHelpers.UnFluffContent(RS("Name"))
+ ' If Not IsDBNull(RS("Length")) Then txtLen.Text = GeneralHelpers.UnFluffContent(RS("Length"))
+ ' If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("epps")) Then eppo = RS("epps")
+ ' If Not IsDBNull(RS("DRAM")) Then txtDRAM.Text = GeneralHelpers.UnFluffContent(RS("DRAM"))
+ ' dPrice = eppo * iQty
+ ' nudQty.Value = iQty
+ ' Dim ObjIM As New InventoryMath
+ ' txtPrice.Text = Converters.ConvertToDollars(dPrice)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Call Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim strlen As String = GeneralHelpers.FluffContent(txtLen.Text)
+ Dim intQty As Integer = nudQty.Value
+ Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
+ Dim sDram As String = GeneralHelpers.FluffContent(txtDRAM.Text)
+ 'Dim LngGAID As Long = cmbGauge.SelectedValue
+ Dim sGauge As String = cmbGauge.Text
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strName, "Name", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strlen, "Length", Text) Then Exit Sub
+ If Not ShotgunHullInventory.Add(DatabasePath, HullId, strManu, strName,
+ sGauge, strlen, intQty, dbPrice, sDram, _errOut) then Throw new Exception(_errOut)
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-
- Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
- Call SaveData()
- End Sub
-End Class
\ No newline at end of file
+ 'Dim EstCostPerItem As Double = 0
+ 'If dbPrice <> 0 And intQty > 0 Then
+ ' EstCostPerItem = (dbPrice / intQty)
+ 'End If
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "UPDATE List_SG_Case set Manufacturer='" & strManu & "',Name='" & strName & "'" & _
+ ' ",Length='" & strlen & "',Gauge='" & sGauge & "', epps=" & EstCostPerItem & ", " & _
+ ' "Qty=" & intQty & ",Price=" & dbPrice & ",GID=" & LngGAID & _
+ ' ", DRAM='" & sDRAM & "' where id=" & HullId
+ 'Obj.ConnExec(SQL)
+ If FromView Then Call FrmViewListShellHulls.LoadData()
+ Close()
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmEditHulls control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmEditHulls_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call AutoLoad()
+ Call Loaddata()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnAdd control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
+ Call SaveData()
+ End Sub
+ End Class
+End Namespace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Editing/frmEditPowder.vb b/BSMyLoadersLog/Editing/frmEditPowder.vb
index 1ff4b41..b46cbc8 100644
--- a/BSMyLoadersLog/Editing/frmEditPowder.vb
+++ b/BSMyLoadersLog/Editing/frmEditPowder.vb
@@ -1,6 +1,7 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BSMyLoadersLog.Viewing
+Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.Helpers
Public Class frmEditPowder
@@ -25,11 +26,11 @@ Public Class frmEditPowder
If Not IsDBNull(RS("weightgn")) Then iQty = RS("weightgn")
If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
'If Not IsDBNull(RS("weightlbs")) Then txtwei.Text = RS("weightlbs")
- txtwei.Text = Math.Round(iQty / WeightGrains1Lbs, 3)
+ txtwei.Text = Math.Round(iQty / WeightValues.WEIGHT_GRAINS_1LBS, 3)
dPrice = eppo * iQty
txtGrains.Text = iQty
Dim ObjIM As New InventoryMath
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
+ txtPrice.Text = Converters.ConvertToDollars(dPrice)
End While
RS.Close()
RS = Nothing
@@ -59,7 +60,7 @@ Public Class frmEditPowder
"weightlbs=" & strWei & ",weightgn=" & dbWeiGrn & "," & _
"Price=" & dbPrice & ",Notes='" & strNotes & "',eppp=" & EstCostPerItem & " where ID=" & PID
Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Powder.LoadData()
+ If FromView Then Call FrmViewListPowder.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditPrimer.Designer.vb b/BSMyLoadersLog/Editing/frmEditPrimer.Designer.vb
index aaab62c..b635f3e 100644
--- a/BSMyLoadersLog/Editing/frmEditPrimer.Designer.vb
+++ b/BSMyLoadersLog/Editing/frmEditPrimer.Designer.vb
@@ -1,239 +1,241 @@
- _
-Partial Class frmEditPrimer
- Inherits System.Windows.Forms.Form
+Namespace Editing
+ _
+ Partial Class FrmEditPrimer
+ Inherits System.Windows.Forms.Form
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
+ '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.
- _
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEditPrimer))
- Me.btnCancel = New System.Windows.Forms.Button
- Me.btnUpdate = New System.Windows.Forms.Button
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.cmbPriType = New System.Windows.Forms.ComboBox
- Me.GeneralPrimerTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
- Me.GeneralPrimerBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.General_PrimerTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
- Me.General_Primer_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'btnCancel
- '
- Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(157, 153)
- Me.btnCancel.Name = "btnCancel"
- Me.btnCancel.Size = New System.Drawing.Size(75, 23)
- Me.btnCancel.TabIndex = 19
- Me.btnCancel.Text = "Cancel"
- Me.btnCancel.UseVisualStyleBackColor = True
- '
- 'btnUpdate
- '
- Me.btnUpdate.Location = New System.Drawing.Point(39, 153)
- Me.btnUpdate.Name = "btnUpdate"
- Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
- Me.btnUpdate.TabIndex = 18
- Me.btnUpdate.Text = "Update"
- Me.btnUpdate.UseVisualStyleBackColor = True
- '
- 'txtPrice
- '
- Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtPrice.Location = New System.Drawing.Point(92, 112)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(166, 20)
- Me.txtPrice.TabIndex = 17
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(92, 86)
- Me.nudQty.Maximum = New Decimal(New Integer() {10000000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(166, 20)
- Me.nudQty.TabIndex = 15
- '
- 'cmbPriType
- '
- Me.cmbPriType.DataSource = Me.GeneralPrimerTypeBindingSource
- Me.cmbPriType.DisplayMember = "Name"
- Me.cmbPriType.FormattingEnabled = True
- Me.cmbPriType.Location = New System.Drawing.Point(92, 59)
- Me.cmbPriType.Name = "cmbPriType"
- Me.cmbPriType.Size = New System.Drawing.Size(166, 21)
- Me.cmbPriType.TabIndex = 14
- Me.cmbPriType.ValueMember = "ID"
- '
- 'GeneralPrimerTypeBindingSource
- '
- Me.GeneralPrimerTypeBindingSource.DataMember = "General_Primer_Type"
- Me.GeneralPrimerTypeBindingSource.DataSource = Me.MLLDataSet
- '
- 'MLLDataSet
- '
- Me.MLLDataSet.DataSetName = "MLLDataSet"
- Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
- '
- 'GeneralPrimerBindingSource
- '
- Me.GeneralPrimerBindingSource.DataMember = "General_Primer"
- Me.GeneralPrimerBindingSource.DataSource = Me.MLLDataSet
- '
- 'txtName
- '
- Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtName.Location = New System.Drawing.Point(92, 32)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(166, 20)
- Me.txtName.TabIndex = 11
- '
- 'txtManu
- '
- Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
- Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
- Me.txtManu.Location = New System.Drawing.Point(92, 6)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(166, 20)
- Me.txtManu.TabIndex = 9
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(12, 115)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(34, 13)
- Me.Label5.TabIndex = 16
- Me.Label5.Text = "Price:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(12, 88)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(26, 13)
- Me.Label4.TabIndex = 13
- Me.Label4.Text = "Qty:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(12, 62)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 13)
- Me.Label3.TabIndex = 12
- Me.Label3.Text = "Primer Type:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 35)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 10
- Me.Label2.Text = "Name:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 9)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 8
- Me.Label1.Text = "Manufacturer:"
- '
- 'General_PrimerTableAdapter
- '
- Me.General_PrimerTableAdapter.ClearBeforeFill = True
- '
- 'General_Primer_TypeTableAdapter
- '
- Me.General_Primer_TypeTableAdapter.ClearBeforeFill = True
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmEditPrimer
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(273, 189)
- Me.Controls.Add(Me.btnCancel)
- Me.Controls.Add(Me.btnUpdate)
- Me.Controls.Add(Me.txtPrice)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.cmbPriType)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Edit Primer from View")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Edit Primer from View")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmEditPrimer"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Edit Primer Details"
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
+ '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.
+ _
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEditPrimer))
+ Me.btnCancel = New System.Windows.Forms.Button
+ Me.btnUpdate = New System.Windows.Forms.Button
+ Me.txtPrice = New System.Windows.Forms.TextBox
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.cmbPriType = New System.Windows.Forms.ComboBox
+ Me.GeneralPrimerTypeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.MLLDataSet = New BSMyLoadersLog.MLLDataSet
+ Me.GeneralPrimerBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.General_PrimerTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
+ Me.General_Primer_TypeTableAdapter = New BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'btnCancel
+ '
+ Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnCancel.Location = New System.Drawing.Point(157, 153)
+ Me.btnCancel.Name = "btnCancel"
+ Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+ Me.btnCancel.TabIndex = 19
+ Me.btnCancel.Text = "Cancel"
+ Me.btnCancel.UseVisualStyleBackColor = True
+ '
+ 'btnUpdate
+ '
+ Me.btnUpdate.Location = New System.Drawing.Point(39, 153)
+ Me.btnUpdate.Name = "btnUpdate"
+ Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+ Me.btnUpdate.TabIndex = 18
+ Me.btnUpdate.Text = "Update"
+ Me.btnUpdate.UseVisualStyleBackColor = True
+ '
+ 'txtPrice
+ '
+ Me.txtPrice.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtPrice.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtPrice.Location = New System.Drawing.Point(92, 112)
+ Me.txtPrice.Name = "txtPrice"
+ Me.txtPrice.Size = New System.Drawing.Size(166, 20)
+ Me.txtPrice.TabIndex = 17
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(92, 86)
+ Me.nudQty.Maximum = New Decimal(New Integer() {10000000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(166, 20)
+ Me.nudQty.TabIndex = 15
+ '
+ 'cmbPriType
+ '
+ Me.cmbPriType.DataSource = Me.GeneralPrimerTypeBindingSource
+ Me.cmbPriType.DisplayMember = "Name"
+ Me.cmbPriType.FormattingEnabled = True
+ Me.cmbPriType.Location = New System.Drawing.Point(92, 59)
+ Me.cmbPriType.Name = "cmbPriType"
+ Me.cmbPriType.Size = New System.Drawing.Size(166, 21)
+ Me.cmbPriType.TabIndex = 14
+ Me.cmbPriType.ValueMember = "ID"
+ '
+ 'GeneralPrimerTypeBindingSource
+ '
+ Me.GeneralPrimerTypeBindingSource.DataMember = "General_Primer_Type"
+ Me.GeneralPrimerTypeBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'MLLDataSet
+ '
+ Me.MLLDataSet.DataSetName = "MLLDataSet"
+ Me.MLLDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
+ '
+ 'GeneralPrimerBindingSource
+ '
+ Me.GeneralPrimerBindingSource.DataMember = "General_Primer"
+ Me.GeneralPrimerBindingSource.DataSource = Me.MLLDataSet
+ '
+ 'txtName
+ '
+ Me.txtName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtName.Location = New System.Drawing.Point(92, 32)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(166, 20)
+ Me.txtName.TabIndex = 11
+ '
+ 'txtManu
+ '
+ Me.txtManu.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
+ Me.txtManu.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
+ Me.txtManu.Location = New System.Drawing.Point(92, 6)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(166, 20)
+ Me.txtManu.TabIndex = 9
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(12, 115)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(34, 13)
+ Me.Label5.TabIndex = 16
+ Me.Label5.Text = "Price:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(12, 88)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(26, 13)
+ Me.Label4.TabIndex = 13
+ Me.Label4.Text = "Qty:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(12, 62)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(66, 13)
+ Me.Label3.TabIndex = 12
+ Me.Label3.Text = "Primer Type:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 35)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 10
+ Me.Label2.Text = "Name:"
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 8
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'General_PrimerTableAdapter
+ '
+ Me.General_PrimerTableAdapter.ClearBeforeFill = True
+ '
+ 'General_Primer_TypeTableAdapter
+ '
+ Me.General_Primer_TypeTableAdapter.ClearBeforeFill = True
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmEditPrimer
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(273, 189)
+ Me.Controls.Add(Me.btnCancel)
+ Me.Controls.Add(Me.btnUpdate)
+ Me.Controls.Add(Me.txtPrice)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.cmbPriType)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Edit Primer from View")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Edit Primer from View")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "frmEditPrimer"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Edit Primer Details"
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GeneralPrimerTypeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.MLLDataSet, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GeneralPrimerBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
- End Sub
- Friend WithEvents btnCancel As System.Windows.Forms.Button
- Friend WithEvents btnUpdate As System.Windows.Forms.Button
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents cmbPriType As System.Windows.Forms.ComboBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
- Friend WithEvents GeneralPrimerBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_PrimerTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
- Friend WithEvents GeneralPrimerTypeBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents General_Primer_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ End Sub
+ Friend WithEvents btnCancel As System.Windows.Forms.Button
+ Friend WithEvents btnUpdate As System.Windows.Forms.Button
+ Friend WithEvents txtPrice As System.Windows.Forms.TextBox
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents cmbPriType As System.Windows.Forms.ComboBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents MLLDataSet As BSMyLoadersLog.MLLDataSet
+ Friend WithEvents GeneralPrimerBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_PrimerTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_PrimerTableAdapter
+ Friend WithEvents GeneralPrimerTypeBindingSource As System.Windows.Forms.BindingSource
+ Friend WithEvents General_Primer_TypeTableAdapter As BSMyLoadersLog.MLLDataSetTableAdapters.General_Primer_TypeTableAdapter
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Editing/frmEditPrimer.vb b/BSMyLoadersLog/Editing/frmEditPrimer.vb
index 5f033cd..c486c2a 100644
--- a/BSMyLoadersLog/Editing/frmEditPrimer.vb
+++ b/BSMyLoadersLog/Editing/frmEditPrimer.vb
@@ -1,80 +1,128 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
Imports BSMyLoadersLog.Viewing
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.Types
-Public Class frmEditPrimer
- Public PID As Long
- Sub LoadData()
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT * from General_Primer where ID=" & PID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim iQty As Integer = 0
- Dim eppo As Double = 0
- Dim dPrice As Double = 0
- While RS.Read
- If Not IsDBNull(RS("Manufacturer")) Then txtManu.Text = GeneralHelpers.UnFluffContent(RS("Manufacturer"))
- If Not IsDBNull(RS("Name")) Then txtName.Text = GeneralHelpers.UnFluffContent(RS("Name"))
- If Not IsDBNull(RS("Primer_Type")) Then
- cmbPriType.SelectedValue = RS("Primer_Type")
+Namespace Editing
+ '''
+ ''' Class FrmEditPrimer.
+ ''' Implements the
+ '''
+ '''
+ Public Class FrmEditPrimer
+ ' TODO: #20 clean up code
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As String
+ '''
+ ''' The primer identifier
+ '''
+ Public PrimerId As Long
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ Dim lst As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, PrimerId, _errOut)
+ If _errOut.Length > 0 then Throw New Exception(_errOut)
+ For Each o As PrimerListings In lst
+ nudQty.Value = o.Qty
+ txtManu.Text = o.Manufacturer
+ txtName.Text = o.Name
+ cmbPriType.SelectedValue = o.PrimerType
cmbPriType.Update()
- End If
- If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
- If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
- If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
- dPrice = eppo * iQty
- nudQty.Value = iQty
- Dim ObjIM As New InventoryMath
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Sub SaveData()
- Try
- Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
- Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
- Dim intPriType As Integer = cmbPriType.SelectedValue
- Dim intQty As Integer = nudQty.Value
- Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
+ txtPrice.Text = Converters.ConvertToDollars(o.Qty * o.PricePerPrimer)
+ Next
+ 'Dim Obj As New BSDatabase
+ 'Call Obj.ConnectDB()
+ 'Dim SQL As String = "SELECT * from General_Primer where ID=" & PrimerId
+ 'Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ 'Dim RS As OdbcDataReader
+ 'RS = CMD.ExecuteReader
+ 'Dim iQty As Integer = 0
+ 'Dim eppo As Double = 0
+ 'Dim newPrice As Double = 0
+ 'While RS.Read
+ ' If Not IsDBNull(RS("Manufacturer")) Then txtManu.Text = GeneralHelpers.UnFluffContent(RS("Manufacturer"))
+ ' If Not IsDBNull(RS("Name")) Then txtName.Text = GeneralHelpers.UnFluffContent(RS("Name"))
+ ' If Not IsDBNull(RS("Primer_Type")) Then
+ ' cmbPriType.SelectedValue = RS("Primer_Type")
+ ' cmbPriType.Update()
+ ' End If
+ ' If Not IsDBNull(RS("Price")) Then newPrice = RS("Price")
+ ' If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
+ ' If Not IsDBNull(RS("eppp")) Then eppo = RS("eppp")
+ ' newPrice = eppo * iQty
+ ' nudQty.Value = iQty
+ ' Dim ObjIM As New InventoryMath
+ ' txtPrice.Text = Converters.ConvertToDollars(newPrice)
+ 'End While
+ 'RS.Close()
+ 'RS = Nothing
+ 'CMD = Nothing
+ 'Obj.CloseDB()
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the data.
+ '''
+ Sub SaveData()
+ Try
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim intPriType As Integer = cmbPriType.SelectedValue
+ Dim intQty As Integer = nudQty.Value
+ Dim dbPrice As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0)
- If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Me.Text) Then Exit Sub
- If Not GeneralHelpers.IsRequired(strName, "Name", Me.Text) Then Exit Sub
- Dim EstCostPerItem As Double = 0
- If dbPrice <> 0 And intQty > 0 Then
- EstCostPerItem = (dbPrice / intQty)
- End If
- Dim Obj As New BSDatabase
- Dim SQL As String = "UPDATE General_Primer set Manufacturer='" & strManu & "',Name='" & strName & "'" & _
- ", Primer_Type=" & intPriType & ",Qty=" & intQty & ",Price=" & dbPrice & _
- ",eppp=" & EstCostPerItem & " where ID=" & PID
- Obj.ConnExec(SQL)
- Me.Close()
- Catch ex As Exception
- Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- Private Sub frmEditPrimer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Me.General_Primer_TypeTableAdapter.Fill(Me.MLLDataSet.General_Primer_Type)
- Me.General_PrimerTableAdapter.Fill(Me.MLLDataSet.General_Primer)
- Call LoadData()
- End Sub
-
- Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
- Me.Close()
- End Sub
-
- Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
- Call SaveData()
- Call frmView_List_Primer.LoadData()
- End Sub
-End Class
\ No newline at end of file
+ If Not GeneralHelpers.IsRequired(strManu, "Manufacturer", Text) Then Exit Sub
+ If Not GeneralHelpers.IsRequired(strName, "Name", Text) Then Exit Sub
+ If Not PrimerInventory.Update(DatabasePath, PrimerId, strManu, strName, intPriType,
+ dbPrice, intQty, _errOut) then Throw new Exception(_errOut)
+ 'Dim EstCostPerItem As Double = 0
+ 'If dbPrice <> 0 And intQty > 0 Then
+ ' EstCostPerItem = (dbPrice / intQty)
+ 'End If
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = "UPDATE General_Primer set Manufacturer='" & strManu & "',Name='" & strName & "'" & _
+ ' ", Primer_Type=" & intPriType & ",Qty=" & intQty & ",Price=" & dbPrice & _
+ ' ",eppp=" & EstCostPerItem & " where ID=" & PrimerId
+ 'Obj.ConnExec(SQL)
+ 'Close()
+ Catch ex As Exception
+ Call LogError(Name, "SaveData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Handles the Load event of the frmEditPrimer control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmEditPrimer_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ General_Primer_TypeTableAdapter.Fill(MLLDataSet.General_Primer_Type)
+ General_PrimerTableAdapter.Fill(MLLDataSet.General_Primer)
+ Call LoadData()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnCancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnUpdate control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
+ Call SaveData()
+ Call FrmViewListPrimer.LoadData()
+ End Sub
+ End Class
+End NameSpace
\ No newline at end of file
diff --git a/BSMyLoadersLog/Editing/frmEditShells.vb b/BSMyLoadersLog/Editing/frmEditShells.vb
index c28003c..408c707 100644
--- a/BSMyLoadersLog/Editing/frmEditShells.vb
+++ b/BSMyLoadersLog/Editing/frmEditShells.vb
@@ -40,7 +40,7 @@ Public Class frmEditShells
dPrice = eppo * iQty
nudQty.Value = iQty
Dim ObjIM As New InventoryMath
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
+ txtPrice.Text = Converters.ConvertToDollars(dPrice)
End While
RS.Close()
RS = Nothing
diff --git a/BSMyLoadersLog/Editing/frmEditShot.vb b/BSMyLoadersLog/Editing/frmEditShot.vb
index a4047d5..d11953b 100644
--- a/BSMyLoadersLog/Editing/frmEditShot.vb
+++ b/BSMyLoadersLog/Editing/frmEditShot.vb
@@ -1,6 +1,8 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
+Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.Helpers
+Imports BSMyLoadersLog.Viewing
Public Class frmEditShot
Public BID As Long
@@ -39,8 +41,8 @@ Public Class frmEditShot
Dim Cost As Double = GeneralHelpers.FluffContent(txtPrice.Text, 0.0)
Dim SQL As String = ""
Dim Obj As New BSDatabase
- Dim ounces As Double = WeightOz1Lbs * CDbl(Weight)
- Dim grams As Double = ounces * WeightGramsOz
+ Dim ounces As Double = WeightValues.WEIGHT_OZ_1LBS * CDbl(Weight)
+ Dim grams As Double = ounces * WeightValues.WEIGHT_GRAMS_OZ
Dim epps As Double = 0
If Cost > 0 Then epps = Cost / grams
@@ -64,7 +66,7 @@ Public Class frmEditShot
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Call SaveData()
- If FromView Then Call frmView_List_Shot.LoadData()
+ If FromView Then Call FrmViewListShot.LoadData()
Me.Close()
End Sub
End Class
\ No newline at end of file
diff --git a/BSMyLoadersLog/Editing/frmEditSlug.vb b/BSMyLoadersLog/Editing/frmEditSlug.vb
index a86e428..648246f 100644
--- a/BSMyLoadersLog/Editing/frmEditSlug.vb
+++ b/BSMyLoadersLog/Editing/frmEditSlug.vb
@@ -1,6 +1,7 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BurnSoft.Applications.MLL.Helpers
+Imports BSMyLoadersLog.Viewing
Public Class frmEditSlug
Public FromView As Boolean
@@ -54,7 +55,7 @@ Public Class frmEditSlug
",weight='" & Weight & "',epps=" & epps & ",Price=" & _
Cost & " where ID=" & SID
Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_Slug.LoadData()
+ If FromView Then Call FrmViewListSlug.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/Editing/frmEditWADS.vb b/BSMyLoadersLog/Editing/frmEditWADS.vb
index 083e10d..ff86ba0 100644
--- a/BSMyLoadersLog/Editing/frmEditWADS.vb
+++ b/BSMyLoadersLog/Editing/frmEditWADS.vb
@@ -1,12 +1,13 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
Imports BurnSoft.Applications.MLL.Helpers
+Imports BSMyLoadersLog.Viewing
Public Class frmEditWADS
'''
''' The error out
'''
- Dim errOut as String
+ Dim errOut As String
Public SID As Integer
Public FromView As Boolean
Sub Loaddata()
@@ -24,7 +25,7 @@ Public Class frmEditWADS
Dim GID As Integer
While RS.Read
If Not IsDBNull(RS("Manufacturer")) Then txtManu.Text = GeneralHelpers.UnFluffContent(RS("Manufacturer"))
- If Not IsDBNull(RS("WAD")) Then txtWAD.Text =GeneralHelpers.UnFluffContent(RS("WAD"))
+ If Not IsDBNull(RS("WAD")) Then txtWAD.Text = GeneralHelpers.UnFluffContent(RS("WAD"))
If Not IsDBNull(RS("Price")) Then dPrice = RS("Price")
If Not IsDBNull(RS("Qty")) Then iQty = RS("Qty")
If Not IsDBNull(RS("eppw")) Then eppo = RS("eppw")
@@ -34,7 +35,7 @@ Public Class frmEditWADS
dPrice = eppo * iQty
nudQty.Value = iQty
Dim ObjIM As New InventoryMath
- txtPrice.Text = ObjIM.ConvertToDollars(dPrice)
+ txtPrice.Text = Converters.ConvertToDollars(dPrice)
End While
RS.Close()
RS = Nothing
@@ -49,9 +50,9 @@ Public Class frmEditWADS
Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
Dim strName As String = GeneralHelpers.FluffContent(txtWAD.Text)
Dim intQty As Integer = nudQty.Value
- Dim dbPrice As Double = GeneralHelpers.FluffContent(cdbl(txtPrice.Text), 0)
+ Dim dbPrice As Double = GeneralHelpers.FluffContent(CDbl(txtPrice.Text), 0)
Dim sLoad As String = GeneralHelpers.FluffContent(txtLoad.Text, "0")
- Dim dLoad As Double = Converters.ConvertOZToDouble(sLoad, errOut)
+ Dim dLoad As Double = Converters.ConvertOzToDouble(sLoad, errOut)
Dim GName As String = cmdGauge.Text
Dim GID As Integer = cmdGauge.SelectedValue
@@ -67,7 +68,7 @@ Public Class frmEditWADS
",gauge='" & GName & "',GID=" & GID & ",load_t='" & sLoad & _
"',load_d=" & dLoad & " where id=" & SID
Obj.ConnExec(SQL)
- If FromView Then Call frmView_List_WADS.LoadData()
+ If FromView Then Call FrmViewListWads.LoadData()
Me.Close()
Catch ex As Exception
Call LogError(Me.Name, "SaveData", Err.Number, ex.Message.ToString)
diff --git a/BSMyLoadersLog/frmLoadMakeReady_Details.Designer.vb b/BSMyLoadersLog/FrmLoadMakeReadyDetails.Designer.vb
similarity index 96%
rename from BSMyLoadersLog/frmLoadMakeReady_Details.Designer.vb
rename to BSMyLoadersLog/FrmLoadMakeReadyDetails.Designer.vb
index 0217103..fb376f2 100644
--- a/BSMyLoadersLog/frmLoadMakeReady_Details.Designer.vb
+++ b/BSMyLoadersLog/FrmLoadMakeReadyDetails.Designer.vb
@@ -1,226 +1,226 @@
- _
-Partial Class frmLoadMakeReady_Details
- Inherits System.Windows.Forms.Form
-
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- 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.
- _
- Private Sub InitializeComponent()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLoadMakeReady_Details))
- Me.Label1 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtManu = New System.Windows.Forms.TextBox
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtCal = New System.Windows.Forms.TextBox
- Me.txtGrains = New System.Windows.Forms.TextBox
- Me.txtJacket = New System.Windows.Forms.TextBox
- Me.lblInv = New System.Windows.Forms.Label
- Me.btnMake = New System.Windows.Forms.Button
- Me.Cancel = New System.Windows.Forms.Button
- Me.nudQty = New System.Windows.Forms.NumericUpDown
- Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(3, 9)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(73, 13)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Manufacturer:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(3, 36)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(38, 13)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "Name:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(3, 62)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 13)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "Caliber:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(3, 88)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(40, 13)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "Grains:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(3, 114)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(42, 13)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "Jacket:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(3, 140)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(26, 13)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "Qty:"
- '
- 'txtManu
- '
- Me.txtManu.Location = New System.Drawing.Point(82, 6)
- Me.txtManu.Name = "txtManu"
- Me.txtManu.Size = New System.Drawing.Size(180, 20)
- Me.txtManu.TabIndex = 1
- '
- 'txtName
- '
- Me.txtName.Location = New System.Drawing.Point(82, 33)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(180, 20)
- Me.txtName.TabIndex = 2
- '
- 'txtCal
- '
- Me.txtCal.Location = New System.Drawing.Point(82, 59)
- Me.txtCal.Name = "txtCal"
- Me.txtCal.Size = New System.Drawing.Size(180, 20)
- Me.txtCal.TabIndex = 3
- '
- 'txtGrains
- '
- Me.txtGrains.Location = New System.Drawing.Point(82, 85)
- Me.txtGrains.Name = "txtGrains"
- Me.txtGrains.Size = New System.Drawing.Size(180, 20)
- Me.txtGrains.TabIndex = 4
- '
- 'txtJacket
- '
- Me.txtJacket.Location = New System.Drawing.Point(82, 111)
- Me.txtJacket.Name = "txtJacket"
- Me.txtJacket.Size = New System.Drawing.Size(180, 20)
- Me.txtJacket.TabIndex = 5
- '
- 'lblInv
- '
- Me.lblInv.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.lblInv.Location = New System.Drawing.Point(6, 166)
- Me.lblInv.Name = "lblInv"
- Me.lblInv.Size = New System.Drawing.Size(256, 42)
- Me.lblInv.TabIndex = 12
- '
- 'btnMake
- '
- Me.btnMake.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnMake.Location = New System.Drawing.Point(24, 223)
- Me.btnMake.Name = "btnMake"
- Me.btnMake.Size = New System.Drawing.Size(92, 21)
- Me.btnMake.TabIndex = 7
- Me.btnMake.Text = "Make"
- Me.btnMake.UseVisualStyleBackColor = True
- '
- 'Cancel
- '
- Me.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.Cancel.Location = New System.Drawing.Point(154, 223)
- Me.Cancel.Name = "Cancel"
- Me.Cancel.Size = New System.Drawing.Size(92, 21)
- Me.Cancel.TabIndex = 8
- Me.Cancel.Text = "Cancel"
- Me.Cancel.UseVisualStyleBackColor = True
- '
- 'nudQty
- '
- Me.nudQty.Location = New System.Drawing.Point(82, 138)
- Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
- Me.nudQty.Name = "nudQty"
- Me.nudQty.Size = New System.Drawing.Size(178, 20)
- Me.nudQty.TabIndex = 6
- '
- 'HelpProvider1
- '
- Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
- '
- 'frmLoadMakeReady_Details
- '
- Me.AcceptButton = Me.btnMake
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.CancelButton = Me.Cancel
- Me.ClientSize = New System.Drawing.Size(272, 256)
- Me.Controls.Add(Me.nudQty)
- Me.Controls.Add(Me.Cancel)
- Me.Controls.Add(Me.btnMake)
- Me.Controls.Add(Me.lblInv)
- Me.Controls.Add(Me.txtJacket)
- Me.Controls.Add(Me.txtGrains)
- Me.Controls.Add(Me.txtCal)
- Me.Controls.Add(Me.txtName)
- Me.Controls.Add(Me.txtManu)
- Me.Controls.Add(Me.Label6)
- Me.Controls.Add(Me.Label5)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.Label1)
- Me.HelpProvider1.SetHelpKeyword(Me, "Make Live Ammunition for this Configuration Load")
- Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
- Me.HelpProvider1.SetHelpString(Me, "Make Live Ammunition for this Configuration Load")
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmLoadMakeReady_Details"
- Me.HelpProvider1.SetShowHelp(Me, True)
- Me.Text = "Ammunition Ready to Use"
- CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- Me.PerformLayout()
-
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents txtManu As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtCal As System.Windows.Forms.TextBox
- Friend WithEvents txtGrains As System.Windows.Forms.TextBox
- Friend WithEvents txtJacket As System.Windows.Forms.TextBox
- Friend WithEvents lblInv As System.Windows.Forms.Label
- Friend WithEvents btnMake As System.Windows.Forms.Button
- Friend WithEvents Cancel As System.Windows.Forms.Button
- Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
- Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
-End Class
+ _
+Partial Class FrmLoadMakeReadyDetails
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ 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.
+ _
+ Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmLoadMakeReadyDetails))
+ Me.Label1 = New System.Windows.Forms.Label
+ Me.Label2 = New System.Windows.Forms.Label
+ Me.Label3 = New System.Windows.Forms.Label
+ Me.Label4 = New System.Windows.Forms.Label
+ Me.Label5 = New System.Windows.Forms.Label
+ Me.Label6 = New System.Windows.Forms.Label
+ Me.txtManu = New System.Windows.Forms.TextBox
+ Me.txtName = New System.Windows.Forms.TextBox
+ Me.txtCal = New System.Windows.Forms.TextBox
+ Me.txtGrains = New System.Windows.Forms.TextBox
+ Me.txtJacket = New System.Windows.Forms.TextBox
+ Me.lblInv = New System.Windows.Forms.Label
+ Me.btnMake = New System.Windows.Forms.Button
+ Me.Cancel = New System.Windows.Forms.Button
+ Me.nudQty = New System.Windows.Forms.NumericUpDown
+ Me.HelpProvider1 = New System.Windows.Forms.HelpProvider
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(3, 9)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(73, 13)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Manufacturer:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(3, 36)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(38, 13)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Name:"
+ '
+ 'Label3
+ '
+ Me.Label3.AutoSize = True
+ Me.Label3.Location = New System.Drawing.Point(3, 62)
+ Me.Label3.Name = "Label3"
+ Me.Label3.Size = New System.Drawing.Size(42, 13)
+ Me.Label3.TabIndex = 2
+ Me.Label3.Text = "Caliber:"
+ '
+ 'Label4
+ '
+ Me.Label4.AutoSize = True
+ Me.Label4.Location = New System.Drawing.Point(3, 88)
+ Me.Label4.Name = "Label4"
+ Me.Label4.Size = New System.Drawing.Size(40, 13)
+ Me.Label4.TabIndex = 3
+ Me.Label4.Text = "Grains:"
+ '
+ 'Label5
+ '
+ Me.Label5.AutoSize = True
+ Me.Label5.Location = New System.Drawing.Point(3, 114)
+ Me.Label5.Name = "Label5"
+ Me.Label5.Size = New System.Drawing.Size(42, 13)
+ Me.Label5.TabIndex = 4
+ Me.Label5.Text = "Jacket:"
+ '
+ 'Label6
+ '
+ Me.Label6.AutoSize = True
+ Me.Label6.Location = New System.Drawing.Point(3, 140)
+ Me.Label6.Name = "Label6"
+ Me.Label6.Size = New System.Drawing.Size(26, 13)
+ Me.Label6.TabIndex = 5
+ Me.Label6.Text = "Qty:"
+ '
+ 'txtManu
+ '
+ Me.txtManu.Location = New System.Drawing.Point(82, 6)
+ Me.txtManu.Name = "txtManu"
+ Me.txtManu.Size = New System.Drawing.Size(180, 20)
+ Me.txtManu.TabIndex = 1
+ '
+ 'txtName
+ '
+ Me.txtName.Location = New System.Drawing.Point(82, 33)
+ Me.txtName.Name = "txtName"
+ Me.txtName.Size = New System.Drawing.Size(180, 20)
+ Me.txtName.TabIndex = 2
+ '
+ 'txtCal
+ '
+ Me.txtCal.Location = New System.Drawing.Point(82, 59)
+ Me.txtCal.Name = "txtCal"
+ Me.txtCal.Size = New System.Drawing.Size(180, 20)
+ Me.txtCal.TabIndex = 3
+ '
+ 'txtGrains
+ '
+ Me.txtGrains.Location = New System.Drawing.Point(82, 85)
+ Me.txtGrains.Name = "txtGrains"
+ Me.txtGrains.Size = New System.Drawing.Size(180, 20)
+ Me.txtGrains.TabIndex = 4
+ '
+ 'txtJacket
+ '
+ Me.txtJacket.Location = New System.Drawing.Point(82, 111)
+ Me.txtJacket.Name = "txtJacket"
+ Me.txtJacket.Size = New System.Drawing.Size(180, 20)
+ Me.txtJacket.TabIndex = 5
+ '
+ 'lblInv
+ '
+ Me.lblInv.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+ Me.lblInv.Location = New System.Drawing.Point(6, 166)
+ Me.lblInv.Name = "lblInv"
+ Me.lblInv.Size = New System.Drawing.Size(256, 42)
+ Me.lblInv.TabIndex = 12
+ '
+ 'btnMake
+ '
+ Me.btnMake.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.btnMake.Location = New System.Drawing.Point(24, 223)
+ Me.btnMake.Name = "btnMake"
+ Me.btnMake.Size = New System.Drawing.Size(92, 21)
+ Me.btnMake.TabIndex = 7
+ Me.btnMake.Text = "Make"
+ Me.btnMake.UseVisualStyleBackColor = True
+ '
+ 'Cancel
+ '
+ Me.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.Cancel.Location = New System.Drawing.Point(154, 223)
+ Me.Cancel.Name = "Cancel"
+ Me.Cancel.Size = New System.Drawing.Size(92, 21)
+ Me.Cancel.TabIndex = 8
+ Me.Cancel.Text = "Cancel"
+ Me.Cancel.UseVisualStyleBackColor = True
+ '
+ 'nudQty
+ '
+ Me.nudQty.Location = New System.Drawing.Point(82, 138)
+ Me.nudQty.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
+ Me.nudQty.Name = "nudQty"
+ Me.nudQty.Size = New System.Drawing.Size(178, 20)
+ Me.nudQty.TabIndex = 6
+ '
+ 'HelpProvider1
+ '
+ Me.HelpProvider1.HelpNamespace = "my_loaders_log_help.chm"
+ '
+ 'frmLoadMakeReady_Details
+ '
+ Me.AcceptButton = Me.btnMake
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.Cancel
+ Me.ClientSize = New System.Drawing.Size(272, 256)
+ Me.Controls.Add(Me.nudQty)
+ Me.Controls.Add(Me.Cancel)
+ Me.Controls.Add(Me.btnMake)
+ Me.Controls.Add(Me.lblInv)
+ Me.Controls.Add(Me.txtJacket)
+ Me.Controls.Add(Me.txtGrains)
+ Me.Controls.Add(Me.txtCal)
+ Me.Controls.Add(Me.txtName)
+ Me.Controls.Add(Me.txtManu)
+ Me.Controls.Add(Me.Label6)
+ Me.Controls.Add(Me.Label5)
+ Me.Controls.Add(Me.Label4)
+ Me.Controls.Add(Me.Label3)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.HelpProvider1.SetHelpKeyword(Me, "Make Live Ammunition for this Configuration Load")
+ Me.HelpProvider1.SetHelpNavigator(Me, System.Windows.Forms.HelpNavigator.KeywordIndex)
+ Me.HelpProvider1.SetHelpString(Me, "Make Live Ammunition for this Configuration Load")
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "FrmLoadMakeReadyDetails"
+ Me.HelpProvider1.SetShowHelp(Me, True)
+ Me.Text = "Ammunition Ready to Use"
+ CType(Me.nudQty, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+ Friend WithEvents Label1 As System.Windows.Forms.Label
+ Friend WithEvents Label2 As System.Windows.Forms.Label
+ Friend WithEvents Label3 As System.Windows.Forms.Label
+ Friend WithEvents Label4 As System.Windows.Forms.Label
+ Friend WithEvents Label5 As System.Windows.Forms.Label
+ Friend WithEvents Label6 As System.Windows.Forms.Label
+ Friend WithEvents txtManu As System.Windows.Forms.TextBox
+ Friend WithEvents txtName As System.Windows.Forms.TextBox
+ Friend WithEvents txtCal As System.Windows.Forms.TextBox
+ Friend WithEvents txtGrains As System.Windows.Forms.TextBox
+ Friend WithEvents txtJacket As System.Windows.Forms.TextBox
+ Friend WithEvents lblInv As System.Windows.Forms.Label
+ Friend WithEvents btnMake As System.Windows.Forms.Button
+ Friend WithEvents Cancel As System.Windows.Forms.Button
+ Friend WithEvents nudQty As System.Windows.Forms.NumericUpDown
+ Friend WithEvents HelpProvider1 As System.Windows.Forms.HelpProvider
+End Class
diff --git a/BSMyLoadersLog/frmLoadMakeReady_Details.resx b/BSMyLoadersLog/FrmLoadMakeReadyDetails.resx
similarity index 98%
rename from BSMyLoadersLog/frmLoadMakeReady_Details.resx
rename to BSMyLoadersLog/FrmLoadMakeReadyDetails.resx
index 894ed88..04b8854 100644
--- a/BSMyLoadersLog/frmLoadMakeReady_Details.resx
+++ b/BSMyLoadersLog/FrmLoadMakeReadyDetails.resx
@@ -1,143 +1,143 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 17, 17
-
-
-
-
- AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
- AAAAAABsdHYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsdHYAAAAAAACirrEAGSpl
- v9gAWX8mcpA2OjsAAAAAAAA2OjtlmKoAZYwmjLIAGSqirrEAAAAAAABsdHYAGSYzsr8AP1kAZowAAAAA
- AAAAAAAAAAAZf5kZZnIAf6UADBlsdHYAAAAAAABsdHYAM0yZ//8AM0wAf7IAAAAISAgISAgAAABmsswz
- mZkAZpkAM0xsdHYAAAAAAABsdHYAM0yZ//8AM0wApdgAAAAAgAAAgAAAAABmsswzmZkAcqUATGZsdHYA
- AAAAAABsdHYAM0yZ//8AM0wAsuUAAAAAgAAAgAAAAABmsswzmZkAf7IATGZsdHYAAAAAAABsdHYAM0yZ
- //8IKAwISAgAQAAAgAAAgAAISAgISAgISAgIbogATGZsdHYAAAAAAABsdHYAM0yy//8ERAgAgAAAgAAA
- gAAAgAAAgAAAgAAAgAAIbogATGZsdHYAAAAAAABsdHYAM0zl//8MLAwISAgISAgAgAAAgAAISAgISAgI
- SAgIbogATGZsdHYAAAAAAACirrEAJjMAf7IAP2oMjLIICAgAgAAAgAAICAgAcpgAWYwAcp0MMz+irrEA
- AAAAAAAAAAAAAABMzOUAZpkATGYICAgAgAAAgAAICAgATGZMzOUAZpkAAAAAAAAAAAAAAAAAAAAAAAA/
- jL8AP4wAGUwICAgISAgISAgICAgAGT8/jL8AP5gAAAAAAAAAAAAAAAAAAAA2Ojtlf7IZTLIADCairrEA
- AAAAAACirrEADDNlf78ZTJg2OjsAAAAAAAAAAAAAAABsdHYMJj8/crIAAAAAAAAAAAAAAAAAAAAAAAAz
- ZqUZM0xsdHYAAAAAAAAAAAAAAACirrEADAx/jIw2OjsAAAAAAAAAAAAAAAA2Ojt/jIwADAyirrEAAAAA
- AAAAAAAAAAAAAAA2OjsAAACirrEAAAAAAAAAAAAAAACirrEAAAA2OjsAAAAAAAAAAACBgQAAgYEAAIGB
- AACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAwAMAAMADAADBgwAAw8MAAMPDAADjxwAA
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+
+
+ AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
+ AAAAAABsdHYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsdHYAAAAAAACirrEAGSpl
+ v9gAWX8mcpA2OjsAAAAAAAA2OjtlmKoAZYwmjLIAGSqirrEAAAAAAABsdHYAGSYzsr8AP1kAZowAAAAA
+ AAAAAAAAAAAZf5kZZnIAf6UADBlsdHYAAAAAAABsdHYAM0yZ//8AM0wAf7IAAAAISAgISAgAAABmsswz
+ mZkAZpkAM0xsdHYAAAAAAABsdHYAM0yZ//8AM0wApdgAAAAAgAAAgAAAAABmsswzmZkAcqUATGZsdHYA
+ AAAAAABsdHYAM0yZ//8AM0wAsuUAAAAAgAAAgAAAAABmsswzmZkAf7IATGZsdHYAAAAAAABsdHYAM0yZ
+ //8IKAwISAgAQAAAgAAAgAAISAgISAgISAgIbogATGZsdHYAAAAAAABsdHYAM0yy//8ERAgAgAAAgAAA
+ gAAAgAAAgAAAgAAAgAAIbogATGZsdHYAAAAAAABsdHYAM0zl//8MLAwISAgISAgAgAAAgAAISAgISAgI
+ SAgIbogATGZsdHYAAAAAAACirrEAJjMAf7IAP2oMjLIICAgAgAAAgAAICAgAcpgAWYwAcp0MMz+irrEA
+ AAAAAAAAAAAAAABMzOUAZpkATGYICAgAgAAAgAAICAgATGZMzOUAZpkAAAAAAAAAAAAAAAAAAAAAAAA/
+ jL8AP4wAGUwICAgISAgISAgICAgAGT8/jL8AP5gAAAAAAAAAAAAAAAAAAAA2Ojtlf7IZTLIADCairrEA
+ AAAAAACirrEADDNlf78ZTJg2OjsAAAAAAAAAAAAAAABsdHYMJj8/crIAAAAAAAAAAAAAAAAAAAAAAAAz
+ ZqUZM0xsdHYAAAAAAAAAAAAAAACirrEADAx/jIw2OjsAAAAAAAAAAAAAAAA2Ojt/jIwADAyirrEAAAAA
+ AAAAAAAAAAAAAAA2OjsAAACirrEAAAAAAAAAAAAAAACirrEAAAA2OjsAAAAAAAAAAACBgQAAgYEAAIGB
+ AACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAwAMAAMADAADBgwAAw8MAAMPDAADjxwAA
+
+
\ No newline at end of file
diff --git a/BSMyLoadersLog/FrmLoadMakeReadyDetails.vb b/BSMyLoadersLog/FrmLoadMakeReadyDetails.vb
new file mode 100644
index 0000000..63935a8
--- /dev/null
+++ b/BSMyLoadersLog/FrmLoadMakeReadyDetails.vb
@@ -0,0 +1,504 @@
+'Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data.Odbc
+'Imports BurnSoft.Applications.MGC
+Imports BurnSoft.Applications.MLL.ConfigSheets
+Imports BurnSoft.Applications.MLL.Global
+Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
+Imports BurnSoft.Applications.MLL.LoadersLog
+Imports BurnSoft.Applications.MLL.Types
+
+'''
+''' Class frmLoadMakeReady_Details.
+''' Implements the
+'''
+'''
+Public Class FrmLoadMakeReadyDetails
+#Region "Variables"
+ '''
+ ''' The error out
+ '''
+ Dim _errOut As string
+ '''
+ ''' The configuration name
+ '''
+ Public ConfigName As String
+ '''
+ ''' The configuration identifier
+ '''
+ Public ConfigId As Long
+ ''''
+ '''' The is personal
+ ''''
+ 'Dim IsPersonal As Boolean
+ '''
+ ''' The is shot gun'
+ '''
+ Dim _isShotGun As Boolean
+ '''
+ ''' The cost bullet
+ '''
+ Dim _bulletPrice As Double
+ '''
+ ''' The cost primer
+ '''
+ Dim _primerPrice As Double
+ '''
+ ''' The cost case
+ '''
+ Dim _casePrice As Double
+ '''
+ ''' The cost powder
+ '''
+ Dim _powderPrice As Double
+ '''
+ ''' The cost shot
+ '''
+ Dim _shotPrice As Double
+ '''
+ ''' The cost slug
+ '''
+ Dim _slugPrice As Double
+ '''
+ ''' The mid powder
+ '''
+ Dim _powderMidRangeLoad As Double
+ '''
+ ''' The l makeable rounds
+ '''
+ Dim _roundsAbleToMake As Long
+ '''
+ ''' The instock bullet
+ '''
+ Dim _bulletQty As Long
+ '''
+ ''' The instock primer
+ '''
+ Dim _primerQty As Long
+ '''
+ ''' The instock case
+ '''
+ Dim _caseQty As Long
+ '''
+ ''' The instock powder
+ '''
+ Dim _powderQty As Double
+
+ '''
+ ''' The instock shot oz
+ '''
+ Dim _shotOzQty As Double
+ '''
+ ''' The shot prefload
+ '''
+ Dim _shotPrefferedLoad As Double
+ '''
+ ''' The instock slug
+ '''
+ Dim _slugQty As Double
+ '''
+ ''' The preffered powder identifier
+ '''
+ Dim _prefferedPowderId As Long
+
+ '''
+ ''' The instock wad
+ '''
+ Dim _wadQty As Double
+ '''
+ ''' The shot details gr
+ '''
+ Dim _shotDetailsInGrains As Double
+ '''
+ ''' The cost wad
+ '''
+ Dim _wadPrice As Double
+ '''
+ ''' The FPS mid
+ '''
+ Dim _midRangeFps As Double
+ '''
+ ''' The is slug
+ '''
+ Dim _isSlug As Boolean
+ '''
+ ''' The bid
+ '''
+ Dim _bulletId As Long
+ '''
+ ''' The prid
+ '''
+ Dim _primerId As Long
+ '''
+ ''' The cid
+ '''
+ Dim _caseId As Long
+ '''
+ ''' The Shot/SlugID
+ '''
+ Dim _shotSlugId As Long
+ '''
+ ''' The Hull ID
+ '''
+ Dim _hullId As Long
+ '''
+ ''' The WAD ID
+ '''
+ Dim _wadId As Long
+ '''
+ ''' The cost to make rounds
+ '''
+ Dim _costToMakeRounds As Double
+
+ '''
+ ''' The instock shot
+ '''
+ Public Property ShotQty as Double
+
+ '''
+ ''' The wad maxload
+ '''
+ Public Property WadMaxLoad as Double
+#End Region
+#Region "General Subs and Functions"
+ '''
+ ''' Loads the costs.
+ '''
+ Sub LoadCosts()
+ Dim lnmr As Long
+ 'Dim dPowPerB As Double
+ If Not _isShotGun Then
+ _costToMakeRounds = Converters.CostOfRoundsOfAmmoMetalic(_primerPrice, _casePrice, _bulletPrice, _powderPrice,
+ _powderMidRangeLoad)
+ lnmr = GeneralCalculations.CalculateMetallicRoundsToMake(_bulletQty, _caseQty, _primerQty,
+ _powderQty, _powderMidRangeLoad, _errOut)
+ If _errOut.Length > 0 Then throw New Exception(_errOut)
+ 'lnmr = _bulletQty
+ 'If lnmr < _caseQty Then
+ ' lnmr = _bulletQty
+ 'ElseIf lnmr > _caseQty Then
+ ' lnmr = _caseQty
+ 'End If
+ 'dPowPerB = (_powderQty / _powderMidRangeLoad)
+ 'If lnmr > _primerQty Then lnmr = _primerQty
+ 'If lnmr > dPowPerB Then lnmr = CLng(dPowPerB)
+ Else
+ If Not _isSlug Then
+ _bulletPrice = _shotPrice * (_shotPrefferedLoad * WeightValues.WEIGHT_GRAMS_OZ) ' * _shotPrice
+ Else
+ _bulletPrice = _slugPrice
+ End If
+ _costToMakeRounds = Converters.CostOfRoundsOfAmmoShotGun(_primerPrice, _casePrice, _bulletPrice,
+ _powderPrice, _powderMidRangeLoad, _wadPrice)
+
+ If _isSlug Then
+ lnmr = GeneralCalculations.CalculateShotgunSlugRoundsToMake(_slugQty, _caseQty, _wadQty,
+ _powderQty, _powderMidRangeLoad,
+ _primerQty, _errOut)
+ If _errOut.Length > 0 Then throw New Exception(_errOut)
+ 'lnmr = _slugQty
+ 'If lnmr < _caseQty Then
+ ' lnmr = _slugQty
+ 'ElseIf lnmr > _caseQty Then
+ ' lnmr = _caseQty
+ 'End If
+ 'If lnmr > _wadQty Then lnmr = _wadQty
+ 'dPowPerB = (_powderQty / _powderMidRangeLoad)
+ 'If lnmr > _primerQty Then lnmr = _primerQty
+ 'If lnmr > dPowPerB Then lnmr = CLng(dPowPerB)
+ Else
+ lnmr = GeneralCalculations.CalculateShotgunRoundsToMake(_shotOzQty, _shotPrefferedLoad, _caseQty, _wadQty,
+ _powderQty, _powderMidRangeLoad,
+ _primerQty, _errOut)
+ If _errOut.Length > 0 Then throw New Exception(_errOut)
+ 'Dim countMakeAble As Double = _shotOzQty / _shotPrefferedLoad
+ 'lnmr = countMakeAble
+ 'If lnmr < _caseQty Then
+ ' lnmr = countMakeAble
+ 'ElseIf lnmr > _caseQty Then
+ ' lnmr = _caseQty
+ 'End If
+ 'If lnmr > _wadQty Then lnmr = _wadQty
+ 'dPowPerB = (_powderQty / _powderMidRangeLoad)
+ 'If lnmr > _primerQty Then lnmr = _primerQty
+ 'If lnmr > dPowPerB Then lnmr = CLng(dPowPerB)
+ End If
+ End If
+ _roundsAbleToMake = lnmr
+ End Sub
+ '''
+ ''' Loads the data.
+ '''
+ Sub LoadData()
+ Try
+ _isShotGun = False
+ 'IsPersonal = False
+ 'Dim Obj As New InventoryMath
+ 'Call Obj.LoadConfig(ConfigID, IsPersonal, IsShotGun, "")
+ Dim lst as List(Of ConfigNameList) = ConfigListDataName.GetDetails(DatabasePath, ConfigId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ConfigNameList In lst
+ 'IsPersonal = o.IsPersonal
+ _isShotGun = o.IsShotGun
+ Next
+ If Not _isShotGun Then
+ _prefferedPowderId = ConfigListDataPowder.GetDefaultPowderId(DatabasePath, ConfigId, _powderMidRangeLoad, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ _powderPrice = PowderInventory.GetPricePerPowder(DatabasePath, _prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ _powderQty = PowderInventory.GetQtyPerPowder(DatabasePath, _prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Call LoadConfig_RiflePistol()
+ Else
+ _prefferedPowderId = ConfigListDataPowderShotGun.GetDefaultPowderId(DatabasePath,
+ CInt(ConfigId), _powderMidRangeLoad,
+ _midRangeFps, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ _powderPrice = PowderInventory.GetPricePerPowder(DatabasePath, _prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ _powderQty = PowderInventory.GetQtyPerPowder(DatabasePath, _prefferedPowderId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ LoadConfig_ShotGun()
+ End If
+ Call LoadCosts()
+ Catch ex As Exception
+ Call LogError(Name, "LoadData", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Loads the configuration rifle pistol.
+ '''
+ Private Sub LoadConfig_RiflePistol()
+ Try
+ Dim lst as List(Of ConfigListDataMetalicData) = ConfigListDataMetalic.GetDetails(DatabasePath, ConfigId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ if lst.Count > 0 Then
+ For Each o As ConfigListDataMetalicData In lst
+ txtManu.Text = OwnerLoadName
+ txtName.Text = ConfigName
+ txtCal.Text = CaliberInventory.GetName(DatabasePath, o.CaliberId, _errOut)
+ _bulletId = o.BulletId
+ _primerId = o.PrimerId
+ _caseId = o.CaseId
+ Next
+ Dim bulletList as List(Of BulletListings) = BulletsInventory.GetDetails(DatabasePath, _bulletId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As BulletListings In bulletList
+ txtJacket.Text = o.Name
+ txtGrains.Text = o.Weight
+ _bulletQty = o.Qty
+ _bulletPrice = o.EsitmatedPricePerBullet
+ Next
+ Dim primerList As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, _primerId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As PrimerListings In primerList
+ _primerPrice = o.PricePerPrimer
+ _primerQty = o.Qty
+ Next
+ Dim caseList As List(Of CaseListings) = CaseInventory.GetDetails(DatabasePath, _caseId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As CaseListings In caseList
+ _casePrice = o.EstimatedPricePerCase
+ _caseQty = o.Qty
+ Next
+ End If
+
+ Catch ex As Exception
+ Call LogError(Name, "LoadConfig_RiflePistol", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Loads the configuration shot gun.
+ '''
+ Private Sub LoadConfig_ShotGun()
+ Try
+ 'Dim ObjIM As New InventoryMath
+
+ 'Dim ShotDetails_Manu As String = ""
+ 'Dim ShotDetails_Name As String = ""
+ 'Dim ShotDetails_QTY As Double = 0
+ 'Dim ShotDetails_EPPS As Double = 0
+ 'Dim ShotDetails_ShotMat As String = ""
+ 'Dim ShotDetails_ShotNo As String = ""
+ 'Dim ShotDetails_SlugWeight As String = ""
+
+ Dim lst As List(Of ConfigListDataShotgunData) = ConfigListDataShotgun.GetDetails(DatabasePath, ConfigId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ConfigListDataShotgunData In lst
+ 'txtCal.Text = CaliberInventory.GetName(DatabasePath, o.AmmoTypeId, _errOut)
+ txtCal.Text = CaliberInventory.GetName(DatabasePath, o.CaliberId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ _shotSlugId = o.ShotChargeLoad
+ _primerId = o.PrimerId
+ _hullId = o.CaseId
+ _wadId = o.Wad
+ txtManu.Text = OwnerLoadName
+ txtName.Text = ConfigName
+ txtGrains.Text = $"{o.ShotWeightText} oz. shot"
+ _shotPrefferedLoad = o.ShotWeight
+ Next
+
+ 'Call ObjIM.LoadSG_ShotType_Details(_shotSlugId, ShotDetails_Manu, ShotDetails_Name, IsSlug, _
+ ' ShotDetails_ShotMat, ShotDetails_ShotNo,
+ ' ShotDetails_SlugWeight, "", ShotDetails_QTY, ShotDetails_EPPS, _
+ ' 0, _shotOzQty, _shotDetailsInGrains)
+ Dim shotList As List(Of ShotgunShotTypeData) = ShotgunShotTypeInventory.GetDetails(DatabasePath, _shotSlugId,
+ errOut := _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ShotgunShotTypeData In shotList
+ 'ShotDetails_Manu = o.Manufacturer
+ 'ShotDetails_Name = o.Name
+ _isSlug = o.IsSlug
+ 'ShotDetails_ShotMat = o.MaterialUsed
+ 'ShotDetails_ShotNo = o.ShotNumber
+ 'ShotDetails_SlugWeight = O.Weight
+ 'ShotDetails_QTY = O.Qty
+ 'ShotDetails_EPPS = O.EstimatedPricePerItem
+ _shotOzQty = o.Ounces
+ _shotDetailsInGrains = o.Grams
+ txtJacket.Text = $"{ o.ShotNumber} Shot"
+ If Not _isSlug Then
+ _shotPrice = O.EstimatedPricePerItem
+ ShotQty = o.Grams
+ Else
+ _slugPrice = O.EstimatedPricePerItem
+ _slugQty = O.Qty
+ End If
+ Next
+ 'txtJacket.Text = $"{ShotDetails_ShotNo} Shot"
+ 'If Not IsSlug Then
+ ' _shotPrice = ShotDetails_EPPS
+ ' _shotQty = _shotDetailsInGrains
+ 'Else
+ ' _slugPrice = ShotDetails_EPPS
+ ' _slugQty = ShotDetails_QTY
+ 'End If
+
+ 'Call ObjIM.LoadWADInfo(_wadId, "", "", "", _wadMaxLoad,
+ ' _wadQty, _wadPrice)
+ Dim wadList as List(Of WadData) = WadInventory.GetDetails(DatabasePath, _wadId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As WadData In wadList
+ WadMaxLoad = o.LoadInOz
+ _wadQty = o.Qty
+ _wadPrice = o.Price
+ Next
+
+ Dim primerList As List(Of PrimerListings) = PrimerInventory.GetDetails(DatabasePath, _primerId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As PrimerListings In primerList
+ _primerPrice = o.PricePerPrimer
+ _primerQty = o.Qty
+ Next
+
+ 'Call ObjIM.LoadHullInfo(_hullId, "", "", "", _caseQty, _casePrice)
+ Dim hullList As List(Of ShotgunHullData) = ShotgunHullInventory.GetDetails(DatabasePath, _hullId, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ For Each o As ShotgunHullData In hullList
+ _caseQty = o.Qty
+ _casePrice = O.Price
+ Next
+
+ Catch ex As Exception
+ Call LogError(Name, "LoadConfig_RiflePistol", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+ '''
+ ''' Saves the audit.
+ '''
+ ''' The qty.
+ Sub SaveAudit(ByVal qty As Long)
+ Try
+ If Not LoadersLogAmmunitionAudit.Add(DatabasePath, ConfigId, Now, qty,
+ Converters.ConvertToDollars(qty * _costToMakeRounds),
+ Converters.ConvertToDollars(_costToMakeRounds),
+ _errOut) Then Throw New Exception(_errOut)
+ ' TODO: #25 Add The generic log generator here or in the function above.
+ Catch ex As Exception
+ Call LogError(Name, "SaveAudit", Err.Number, ex.Message.ToString)
+ End Try
+ End Sub
+#End Region
+#Region "Form Subs"
+ '''
+ ''' Handles the Load event of the frmLoadMakeReady_Details control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub frmLoadMakeReady_Details_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
+ Call LoadData()
+ lblInv.Text = $"NOTE: Inventory states that you have enough to make {_roundsAbleToMake} rounds."
+ nudQty.Maximum = _roundsAbleToMake
+ End Sub
+ '''
+ ''' Handles the Click event of the Cancel control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ Private Sub Cancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Cancel.Click
+ Close()
+ End Sub
+ '''
+ ''' Handles the Click event of the btnMake control.
+ '''
+ ''' The source of the event.
+ ''' The instance containing the event data.
+ '''
+ Private Sub btnMake_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnMake.Click
+ Dim strManu As String = GeneralHelpers.FluffContent(txtManu.Text)
+ Dim strName As String = GeneralHelpers.FluffContent(txtName.Text)
+ Dim strCaliber As String = GeneralHelpers.FluffContent(txtCal.Text)
+ Dim strGrains As String = GeneralHelpers.FluffContent(txtGrains.Text)
+ Dim strJacket As String = GeneralHelpers.FluffContent(txtJacket.Text)
+ 'Dim dcal As Double = ConvToNum(strGrains)
+ 'Converters
+ 'Dim dcal As Double = Converters.ConvToNum(strGrains, _errOut)
+ 'If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim iQty As Long = nudQty.Value
+ Dim cQty As Long = 0
+ 'Dim ObjIM As New InventoryMath
+ 'Dim Obj As New BSDatabase
+ 'Dim SQL As String = ""
+ Dim ammoId As Long = 0
+
+ If LoadersLogAmmunition.IsAlreadyListed(DatabasePath, strManu, strName, strCaliber,
+ strGrains, strJacket, _errOut, cQty, ammoId) Then
+ If Not LoadersLogAmmunition.UpdateQty(DatabasePath, ammoId, (cQty + iQty),
+ _errOut) then throw New Exception(_errOut)
+ Else
+ if not LoadersLogAmmunition.Add(DatabasePath, strManu, strName, strCaliber,
+ strGrains, strJacket, iQty, _midRangeFps,
+ _errOut) then Throw new Exception(_errOut)
+ End If
+
+ 'If ObjIM.IsAlreadyListed(strManu, strName, strCaliber, strGrains, strJacket, cQty, MID) Then
+ ' SQL = "UPDATE Loaders_Log_Ammunition set Qty='" & (cQty + iQty) & "' where id=" & MID
+ ' Obj.ConnExec(SQL)
+ 'Else
+ ' SQL = "INSERT INTO Loaders_Log_Ammunition(Manufacturer,Name,Cal,Grain,Jacket,Qty,dcal,Vel) VALUES('" & _
+ ' strManu & "','" & strName & "','" & strCaliber & "','" & strGrains & "','" & _
+ ' strJacket & "'," & iQty & "," & dcal & "," & _midRangeFps & ")"
+ ' Obj.ConnExec(SQL)
+ 'End If
+ If Not _isShotGun Then
+ 'Call ObjIM.ARUNSG_UpdateInventoryQty(iQty, _bulletQty, _bulletId, _primerQty, _primerId, _caseQty, _CaseId, _
+ ' _powderQty, PrefferedPowderID, _powderMidRangeLoad)
+ If Not InventoryUpdate.MetallicUpdate(DatabasePath, iQty, _bulletQty, _bulletId,
+ _primerQty, _primerId, _caseQty,
+ _caseId, _powderQty,_prefferedPowderId,
+ _powderMidRangeLoad, _errOut) Then Throw New Exception(_errOut)
+ Else
+ 'Call ObjIM.ARUSG_UpdateInventoryQty(iQty, _slugQty, _shotSlugId, _primerQty, _primerId, _caseQty, _hullId, _
+ ' _powderQty, PrefferedPowderID, _powderMidRangeLoad, _wadQty, _wadId, IsSlug, _shotOzQty, _shotDetailsInGrains, _shotPrefferedLoad)
+ If not InventoryUpdate.ShotgunUpdate(DatabasePath, iQty, _shotSlugId, _slugQty,
+ _isSlug, _shotOzQty,_shotDetailsInGrains,
+ _shotPrefferedLoad, _wadQty, _wadId,
+ _primerQty, _primerId, _caseQty, _caseId,
+ _powderQty, _prefferedPowderId,
+ _midRangeFps, _errOut) Then Throw new Exception(_errOut)
+ End If
+ Call SaveAudit(iQty)
+ Close()
+ End Sub
+#End Region
+End Class
\ No newline at end of file
diff --git a/BSMyLoadersLog/GlobalVars.vb b/BSMyLoadersLog/GlobalVars.vb
index 677f6d5..9c0fa7b 100644
--- a/BSMyLoadersLog/GlobalVars.vb
+++ b/BSMyLoadersLog/GlobalVars.vb
@@ -59,11 +59,11 @@ Module GlobalVars
'''
''' The loadertype shotgun
'''
- Public LoadertypeShotgun As Boolean
+ Public LoaderTypeShotGun As Boolean
'''
- ''' The loadertype nonshotgun
+ ''' The loader type metallic reloading
'''
- Public LoadertypeNonshotgun As Boolean
+ Public LoaderTypeMetalic As Boolean
'''
''' The defaultlist
'''
@@ -108,66 +108,66 @@ Module GlobalVars
''' The application path data
'''
Public ApplicationPathData As String
- '''
- ''' Help File path
- '''
- Public Const MyHelpFile = GeneralSettings.MY_HELP_FILE
- '''
- ''' Hotfixe file path
- '''
- Public Const MyHotfixFile = GeneralSettings.MY_HOTFIX_FILE
- '''
- ''' Backup application
- '''
- Public Const MyBackup = GeneralSettings.MY_BACKUP
- '''
- ''' Restore application
- '''
- Public Const MyRestore = GeneralSettings.MY_RESTORE
- '''
- ''' Wiki Link
- '''
- Public Const MenuWiki = GeneralSettings.MENU_WIKI
- '''
- ''' Shop Menu, might not be used anymore
- '''
- Public Const MenuShop = GeneralSettings.MENU_SHOP
- '''
- ''' Bug Report link
- '''
- Public Const MenuBug = GeneralSettings.MENU_BUG
- '''
- ''' Support Link
- '''
- Public Const MenuSupport = GeneralSettings.MENU_SUPPORT
- '''
- ''' Search Site, might not be used anymore
- '''
- Public Const MenuSitesearch = GeneralSettings.MENU_SITESEARCH
- '''
- ''' Menu Links Might not Be used anymore
- '''
- Public Const MenuLinks = GeneralSettings.MENU_LINKS
- '''
- ''' Weight Grains 1 lbs
- '''
- Public Const WeightGrains1Lbs = WeightValues.WEIGHT_GRAINS_1LBS
- '''
- ''' Weight in Grains 1 gm
- '''
- Public Const WeightGrains1Gm = WeightValues.WEIGHT_GRAINS_1GM
- '''
- ''' Weight in Grams for 1 lbs
- '''
- Public Const WeightGrams1Lbs = WeightValues.WEIGHT_GRAMS_1LBS
- '''
- ''' Weight in oz for 1 lbs
- '''
- Public Const WeightOz1Lbs = WeightValues.WEIGHT_OZ_1LBS
- '''
- ''' Weight in Grams from Ounce
- '''
- Public Const WeightGramsOz = WeightValues.WEIGHT_GRAMS_OZ
+ ''''
+ '''' Help File path
+ ''''
+ 'Public Const MyHelpFile = GeneralSettings.MY_HELP_FILE
+ ''''
+ '''' Hotfixe file path
+ ''''
+ 'Public Const MyHotfixFile = GeneralSettings.MY_HOTFIX_FILE
+ ''''
+ '''' Backup application
+ ''''
+ 'Public Const MyBackup = GeneralSettings.MY_BACKUP
+ ''''
+ '''' Restore application
+ ''''
+ 'Public Const MyRestore = GeneralSettings.MY_RESTORE
+ ''''
+ '''' Wiki Link
+ ''''
+ 'Public Const MenuWiki = GeneralSettings.MENU_WIKI
+ ''''
+ '''' Shop Menu, might not be used anymore
+ ''''
+ 'Public Const MenuShop = GeneralSettings.MENU_SHOP
+ ''''
+ '''' Bug Report link
+ ''''
+ 'Public Const MenuBug = GeneralSettings.MENU_BUG
+ ''''
+ '''' Support Link
+ ''''
+ 'Public Const MenuSupport = GeneralSettings.MENU_SUPPORT
+ ''''
+ '''' Search Site, might not be used anymore
+ ''''
+ 'Public Const MenuSitesearch = GeneralSettings.MENU_SITESEARCH
+ ''''
+ '''' Menu Links Might not Be used anymore
+ ''''
+ 'Public Const MenuLinks = GeneralSettings.MENU_LINKS
+ ''''
+ '''' Weight Grains 1 lbs
+ ''''
+ 'Public Const WeightGrains1Lbs = WeightValues.WEIGHT_GRAINS_1LBS
+ ''''
+ '''' Weight in Grains 1 gm
+ ''''
+ 'Public Const WeightGrains1Gm = WeightValues.WEIGHT_GRAINS_1GM
+ ''''
+ '''' Weight in Grams for 1 lbs
+ ''''
+ 'Public Const WeightGrams1Lbs = WeightValues.WEIGHT_GRAMS_1LBS
+ ''''
+ '''' Weight in oz for 1 lbs
+ ''''
+ 'Public Const WeightOz1Lbs = WeightValues.WEIGHT_OZ_1LBS
+ ''''
+ '''' Weight in Grams from Ounce
+ ''''
+ 'Public Const WeightGramsOz = WeightValues.WEIGHT_GRAMS_OZ
'''
''' The Database Name
'''
@@ -187,6 +187,8 @@ Module GlobalVars
Dim objFs As New BurnSoft.Universal.FileIO
Dim sMessage As String = sForm & "." & sProcedure & "::" & iErrNo & "::" & sErrorDesc
objFs.LogFile(MyLogFile, sMessage)
+ MDIParentMain.tsslErrorsFound.Visible = True
+ MDIParentMain.tsslErrorsFound.Enabled = True
End Sub
End Module
diff --git a/BSMyLoadersLog/ImportExport/frmImportFirearms.vb b/BSMyLoadersLog/ImportExport/frmImportFirearms.vb
index cec5b72..8a4208c 100644
--- a/BSMyLoadersLog/ImportExport/frmImportFirearms.vb
+++ b/BSMyLoadersLog/ImportExport/frmImportFirearms.vb
@@ -1,12 +1,15 @@
Imports BSMyLoadersLog.LoadersClass
Imports System.Data.Odbc
+Imports BurnSoft.Applications.MGC.LoadersLog
Imports BurnSoft.Applications.MLL.Helpers
Public Class frmImportFirearms
+ Dim errOut As String
Dim iCount As Integer
Private Sub frmImportFirearms_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Obj As New BSMGC
- iCount = Obj.CountFirearms
+ 'iCount = Obj.CountFirearms
+ iCount = FirearmHelpers.CountFirearms(errOut)
If iCount = 1 Then
Label1.Text = "You have " & iCount & " firearm in your collection, are you ready to import or update to the local database?"
ElseIf iCount > 1 Then
diff --git a/BSMyLoadersLog/LoadersClass.vb b/BSMyLoadersLog/LoadersClass.vb
index a557f81..4442e94 100644
--- a/BSMyLoadersLog/LoadersClass.vb
+++ b/BSMyLoadersLog/LoadersClass.vb
@@ -1,13 +1,14 @@
-Imports System
-Imports System.IO
+'Imports System
+'Imports System.IO
Imports System.Xml
-Imports System.Text
-Imports System.Data
+'Imports System.Text
+'Imports System.Data
Imports System.Data.Odbc
-Imports System.Windows.Forms
-Imports Microsoft.Win32
+'Imports System.Windows.Forms
+'Imports Microsoft.Win32
Imports System.Configuration
-Imports BurnSoft.Applications.MLL.Helpers
+'Imports BurnSoft.Applications.MLL.Global
+'Imports BurnSoft.Applications.MLL.Helpers
Imports BurnSoft.Universal
Namespace LoadersClass
@@ -188,7 +189,11 @@ Namespace LoadersClass
' MyReg.Close()
'End Sub
'
- 'Public Sub SaveSettings(ByVal NumberFormat As String, ByVal TrackHistory As Boolean, ByVal TrackHistoryDays As Integer, ByVal AutoUpdate As Boolean, ByVal UseProxy As Boolean, ByVal AlertOnBackUp As Boolean, ByVal AutoBackup As Boolean, ByVal UOIMG As Boolean, ByVal UseSHOTGUN As Boolean, ByVal UseNONSHOTGUN As Boolean, ByVal UseDEFAULTLIST As String, ByVal UseIPer As Boolean, ByVal UseViewFPS As Boolean, ByVal UseViewCUPS As Boolean)
+ 'Public Sub SaveSettings(ByVal NumberFormat As String, ByVal TrackHistory As Boolean, ByVal TrackHistoryDays As Integer,
+ ' ByVal AutoUpdate As Boolean, ByVal UseProxy As Boolean, ByVal AlertOnBackUp As Boolean,
+ ' ByVal AutoBackup As Boolean, ByVal UOIMG As Boolean, ByVal UseSHOTGUN As Boolean,
+ ' ByVal UseNONSHOTGUN As Boolean, ByVal UseDEFAULTLIST As String, ByVal UseIPer As Boolean,
+ ' ByVal UseViewFPS As Boolean, ByVal UseViewCUPS As Boolean)
' Dim strValue As String = DefaultRegPath & "\Settings"
' If Not RegSubKeyExists(strValue) Then Call CreateSubKey(strValue)
' Dim MyReg As RegistryKey
@@ -298,28 +303,28 @@ Namespace LoadersClass
"ConnExec.strSQL=" & strSQL)
End Try
End Sub
-
- Public Function GetData(ByVal SQL As String) As DataTable
- Dim Table As New DataTable
- Try
- Table.Locale = System.Globalization.CultureInfo.InvariantCulture
- Call ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Conn)
- Dim RS As New OdbcDataAdapter
- RS.SelectCommand = CMD
- RS.Fill(Table)
- Catch ex As Exception
- 'Dim ObjFS As New BSFileSystem
- 'Dim sMessage As String = "MLL.BSDatabase.GetData" & "::" & Err.Number & "::" & ex.Message.ToString() & Chr(10) & "SQL STATEMENT: " & SQL
- 'ObjFS.LogFile(MyLogFile, "GetData.SQL=" & SQL)
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("BSDatabase", "GetData", Err.Number,
- ex.Message.ToString)
- Call LogError("BSDatabase", "GetData", 0,
- "GetData.strSQL=" & SQL)
- End Try
- Return Table
- End Function
+ '
+ ' Public Function GetData(ByVal SQL As String) As DataTable
+ ' Dim Table As New DataTable
+ ' Try
+ ' Table.Locale = System.Globalization.CultureInfo.InvariantCulture
+ ' Call ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Conn)
+ ' Dim RS As New OdbcDataAdapter
+ ' RS.SelectCommand = CMD
+ ' RS.Fill(Table)
+ ' Catch ex As Exception
+ ' 'Dim ObjFS As New BSFileSystem
+ ' 'Dim sMessage As String = "MLL.BSDatabase.GetData" & "::" & Err.Number & "::" & ex.Message.ToString() & Chr(10) & "SQL STATEMENT: " & SQL
+ ' 'ObjFS.LogFile(MyLogFile, "GetData.SQL=" & SQL)
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("BSDatabase", "GetData", Err.Number,
+ ' ex.Message.ToString)
+ ' Call LogError("BSDatabase", "GetData", 0,
+ ' "GetData.strSQL=" & SQL)
+ ' End Try
+ ' Return Table
+ ' End Function
End Class
'
'Public Class BSFileSystem
@@ -427,369 +432,369 @@ Namespace LoadersClass
' Return sAns
' End Function
'End Class
- Public Class AutoFillCollections
- Public Class ShotGun
-
- Private Function MainCollection(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
- Dim iCol As New AutoCompleteStringCollection
- Dim ArrList As New ArrayList
- Dim SQL As String = "SELECT " & strColumn & " from " & strTable & " order by " & strColumn & " ASC"
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- iCol.Clear()
- If RS.HasRows Then
- While (RS.Read())
- If Not IsDBNull(RS(strColumn)) Then iCol.Add(RS(strColumn))
- End While
- Else
- iCol.Add("N/A")
- End If
- RS.Close()
- CMD = Nothing
- Call Obj.CloseDB()
- Return iCol
- End Function
-
- Private Function MainCollectionDistinct(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
- Dim iCol As New AutoCompleteStringCollection
- Dim ArrList As New ArrayList
- Dim SQL As String = "SELECT distinct(" & strColumn & ") as Res from " & strTable & " order by " & strColumn & " ASC"
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- iCol.Clear()
- If RS.HasRows Then
- While (RS.Read())
- If Not IsDBNull(RS("Res")) Then iCol.Add(RS("Res"))
- End While
- Else
- iCol.Add("N/A")
- End If
- RS.Close()
- CMD = Nothing
- Call Obj.CloseDB()
- Return iCol
- End Function
-
- Public Function Config_Source_SG() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Source", "Config_List_Data_SG")
- End Function
-
- Public Function Config_LoadInOZ_SG() As AutoCompleteStringCollection
- Return MainCollectionDistinct("SW_t", "Config_List_Data_SG")
- End Function
-
- Public Function List_SG_WAD_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_SG_WAD")
- End Function
-
- Public Function List_SG_WAD_WAD() As AutoCompleteStringCollection
- Return MainCollectionDistinct("WAD", "List_SG_WAD")
- End Function
-
- Public Function List_SG_WAD_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "List_SG_WAD")
- End Function
-
- Public Function List_SG_Bushings_Powder_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_SG_Bushing_Powder")
- End Function
-
- Public Function List_SG_Bushings_Powder_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("sName", "List_SG_Bushing_Powder")
- End Function
-
- Public Function List_SG_Bushings_Powder_sCharge() As AutoCompleteStringCollection
- Return MainCollectionDistinct("sCharge", "List_SG_Bushing_Powder")
- End Function
-
- Public Function List_SG_Bushings_Powder_Powder() As AutoCompleteStringCollection
- Return MainCollectionDistinct("name", "General_Powder")
- End Function
-
- Public Function List_SG_Bushings_Shot_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_SG_Bushing_Shot")
- End Function
-
- Public Function List_SG_Bushings_Shot_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("sName", "List_SG_Bushing_Shot")
- End Function
-
- Public Function List_SG_Bushings_Shot_sCharge() As AutoCompleteStringCollection
- Return MainCollectionDistinct("sCharge", "List_SG_Bushing_Shot")
- End Function
-
- Public Function List_SG_Log_SG_Patterns() As AutoCompleteStringCollection
- Return MainCollectionDistinct("pd", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_ShotWt() As AutoCompleteStringCollection
- Return MainCollectionDistinct("shotwt", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_ShotSize() As AutoCompleteStringCollection
- Return MainCollectionDistinct("shotsize", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_Case() As AutoCompleteStringCollection
- Return MainCollectionDistinct("case", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_PowderBushing() As AutoCompleteStringCollection
- Return MainCollectionDistinct("pbm", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_Wad() As AutoCompleteStringCollection
- Return MainCollectionDistinct("wad", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Log_SG_Primer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("primer", "Loaders_Log_SG")
- End Function
-
- Public Function List_SG_Case_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_SG_Case")
- End Function
-
- Public Function List_SG_Case_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "List_SG_Case")
- End Function
-
- Public Function List_SG_Case_DRAM() As AutoCompleteStringCollection
- Return MainCollectionDistinct("DRAM", "List_SG_Case")
- End Function
-
- Public Function List_SG_Case_Gauge() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Gauge", "List_SG_Case")
- End Function
-
- Public Function List_SG_Case_Length() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Length", "List_SG_Case")
- End Function
-
- Public Function List_SG_Case_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "List_SG_Case")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_Manu() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_mat() As AutoCompleteStringCollection
- Return MainCollectionDistinct("mat", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_ShotNo() As AutoCompleteStringCollection
- Return MainCollectionDistinct("ShotNo", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_weight() As AutoCompleteStringCollection
- Return MainCollectionDistinct("weight", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_CAL() As AutoCompleteStringCollection
- Return MainCollectionDistinct("CAL", "List_SG_ShotType_Details")
- End Function
-
- Public Function List_SG_SHOTSLUG_Details_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "List_SG_ShotType_Details")
- End Function
- End Class
- Private Function MainCollection(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
- Dim iCol As New AutoCompleteStringCollection
- Dim ArrList As New ArrayList
- Dim SQL As String = "SELECT " & strColumn & " from " & strTable & " order by " & strColumn & " ASC"
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- iCol.Clear()
- If RS.HasRows Then
- While (RS.Read())
- If Not IsDBNull(RS(strColumn)) Then iCol.Add(RS(strColumn))
- End While
- Else
- iCol.Add("N/A")
- End If
- RS.Close()
- CMD = Nothing
- Call Obj.CloseDB()
- Return iCol
- End Function
- Private Function MainCollectionDistinct(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
- Dim iCol As New AutoCompleteStringCollection
- Dim ArrList As New ArrayList
- Dim SQL As String = "SELECT distinct(" & strColumn & ") as Res from " & strTable & " order by " & strColumn & " ASC"
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- iCol.Clear()
- If RS.HasRows Then
- While (RS.Read())
- If Not IsDBNull(RS("Res")) Then iCol.Add(RS("Res"))
- End While
- Else
- iCol.Add("N/A")
- End If
- RS.Close()
- CMD = Nothing
- Call Obj.CloseDB()
- Return iCol
- End Function
-
- Public Function General_Calibers() As AutoCompleteStringCollection
- Return MainCollection("Cal", "General_Calibers")
- End Function
-
- Public Function General_Primer_Type_ManuFacturers() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "General_Primer")
- End Function
-
- Public Function General_Primer_Type_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "General_Primer")
- End Function
-
- Public Function General_Primer_Type_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "General_Primer")
- End Function
-
- Public Function General_Powder_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "General_Powder")
- End Function
-
- Public Function General_Powder_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "General_Powder")
- End Function
-
- Public Function General_Powder_WeightInPounds() As AutoCompleteStringCollection
- Return MainCollectionDistinct("weightlbs", "General_Powder")
- End Function
-
- Public Function General_Powder_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "General_Powder")
- End Function
- '
- 'Public Function List_Bullets_Manufacturer() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Manufacturer", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Name() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Name", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Diameter() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Diameter", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Sec_Den() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Sec_Den", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Part_number() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Part_number", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Ballistic_Coefficient() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Ballistic_Coefficient", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Price() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Price", "List_Bullets")
- 'End Function
- '
- 'Public Function List_Bullets_Weight() As AutoCompleteStringCollection
- ' Return MainCollectionDistinct("Weight", "List_Bullets")
- 'End Function
-
- Public Function List_Case_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "List_Case")
- End Function
-
- Public Function List_Case_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "List_Case")
- End Function
-
- Public Function List_Case_Trim_to_length() As AutoCompleteStringCollection
- Return MainCollectionDistinct("ttl", "List_Case")
- End Function
-
- Public Function List_Case_Price() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Price", "List_Case")
- End Function
-
- Public Function General_Equipment_Manufacturer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Manufacturer", "General_Equipment")
- End Function
-
- Public Function General_Equipment_Name() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Name", "General_Equipment")
- End Function
-
- Public Function General_Equipment_Use() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Use", "General_Equipment")
- End Function
-
- Public Function General_Equipment_Cost() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Cost", "General_Equipment")
- End Function
-
- Public Function ConfigName() As AutoCompleteStringCollection
- Return MainCollectionDistinct("ConfigName", "Config_List_Name")
- End Function
-
- Public Function Config_Source_NSG() As AutoCompleteStringCollection
- Return MainCollectionDistinct("Source", "Config_List_Data_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_GroupSize() As AutoCompleteStringCollection
- Return MainCollectionDistinct("gs", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_Powder() As AutoCompleteStringCollection
- Return MainCollectionDistinct("pwm", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_Bullet() As AutoCompleteStringCollection
- Return MainCollectionDistinct("bullet", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_primer() As AutoCompleteStringCollection
- Return MainCollectionDistinct("primer", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_case() As AutoCompleteStringCollection
- Return MainCollectionDistinct("case", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_conditions() As AutoCompleteStringCollection
- Return MainCollectionDistinct("conditions", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_tl() As AutoCompleteStringCollection
- Return MainCollectionDistinct("tl", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_notes() As AutoCompleteStringCollection
- Return MainCollectionDistinct("notes", "Loaders_Log_NSG")
- End Function
-
- Public Function Loaders_Log_NSG_ConfigName() As AutoCompleteStringCollection
- Return MainCollectionDistinct("ConfigName", "Loaders_Log_NSG")
- End Function
+ 'Public Class AutoFillCollections
+ ' Public Class ShotGun
+ '
+ ' Private Function MainCollection(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
+ ' Dim iCol As New AutoCompleteStringCollection
+ ' Dim ArrList As New ArrayList
+ ' Dim SQL As String = "SELECT " & strColumn & " from " & strTable & " order by " & strColumn & " ASC"
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' iCol.Clear()
+ ' If RS.HasRows Then
+ ' While (RS.Read())
+ ' If Not IsDBNull(RS(strColumn)) Then iCol.Add(RS(strColumn))
+ ' End While
+ ' Else
+ ' iCol.Add("N/A")
+ ' End If
+ ' RS.Close()
+ ' CMD = Nothing
+ ' Call Obj.CloseDB()
+ ' Return iCol
+ ' End Function
+ '
+ ' Private Function MainCollectionDistinct(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
+ ' Dim iCol As New AutoCompleteStringCollection
+ ' Dim ArrList As New ArrayList
+ ' Dim SQL As String = "SELECT distinct(" & strColumn & ") as Res from " & strTable & " order by " & strColumn & " ASC"
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' iCol.Clear()
+ ' If RS.HasRows Then
+ ' While (RS.Read())
+ ' If Not IsDBNull(RS("Res")) Then iCol.Add(RS("Res"))
+ ' End While
+ ' Else
+ ' iCol.Add("N/A")
+ ' End If
+ ' RS.Close()
+ ' CMD = Nothing
+ ' Call Obj.CloseDB()
+ ' Return iCol
+ ' End Function
+ '
+ ' Public Function Config_Source_SG() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Source", "Config_List_Data_SG")
+ ' End Function
+ '
+ ' Public Function Config_LoadInOZ_SG() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("SW_t", "Config_List_Data_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_WAD_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_SG_WAD")
+ ' End Function
+ '
+ ' Public Function List_SG_WAD_WAD() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("WAD", "List_SG_WAD")
+ ' End Function
+ '
+ ' Public Function List_SG_WAD_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "List_SG_WAD")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Powder_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_SG_Bushing_Powder")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Powder_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("sName", "List_SG_Bushing_Powder")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Powder_sCharge() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("sCharge", "List_SG_Bushing_Powder")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Powder_Powder() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("name", "General_Powder")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Shot_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_SG_Bushing_Shot")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Shot_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("sName", "List_SG_Bushing_Shot")
+ ' End Function
+ '
+ ' Public Function List_SG_Bushings_Shot_sCharge() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("sCharge", "List_SG_Bushing_Shot")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_Patterns() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("pd", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_ShotWt() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("shotwt", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_ShotSize() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("shotsize", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_Case() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("case", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_PowderBushing() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("pbm", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_Wad() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("wad", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Log_SG_Primer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("primer", "Loaders_Log_SG")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_DRAM() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("DRAM", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_Gauge() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Gauge", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_Length() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Length", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_Case_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "List_SG_Case")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_Manu() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_mat() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("mat", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_ShotNo() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("ShotNo", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_weight() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("weight", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_CAL() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("CAL", "List_SG_ShotType_Details")
+ ' End Function
+ '
+ ' Public Function List_SG_SHOTSLUG_Details_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "List_SG_ShotType_Details")
+ ' End Function
+ ' End Class
+ ' Private Function MainCollection(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
+ ' Dim iCol As New AutoCompleteStringCollection
+ ' Dim ArrList As New ArrayList
+ ' Dim SQL As String = "SELECT " & strColumn & " from " & strTable & " order by " & strColumn & " ASC"
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' iCol.Clear()
+ ' If RS.HasRows Then
+ ' While (RS.Read())
+ ' If Not IsDBNull(RS(strColumn)) Then iCol.Add(RS(strColumn))
+ ' End While
+ ' Else
+ ' iCol.Add("N/A")
+ ' End If
+ ' RS.Close()
+ ' CMD = Nothing
+ ' Call Obj.CloseDB()
+ ' Return iCol
+ ' End Function
+ ' Private Function MainCollectionDistinct(ByVal strColumn As String, ByVal strTable As String) As AutoCompleteStringCollection
+ ' Dim iCol As New AutoCompleteStringCollection
+ ' Dim ArrList As New ArrayList
+ ' Dim SQL As String = "SELECT distinct(" & strColumn & ") as Res from " & strTable & " order by " & strColumn & " ASC"
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' iCol.Clear()
+ ' If RS.HasRows Then
+ ' While (RS.Read())
+ ' If Not IsDBNull(RS("Res")) Then iCol.Add(RS("Res"))
+ ' End While
+ ' Else
+ ' iCol.Add("N/A")
+ ' End If
+ ' RS.Close()
+ ' CMD = Nothing
+ ' Call Obj.CloseDB()
+ ' Return iCol
+ ' End Function
+ '
+ ' Public Function General_Calibers() As AutoCompleteStringCollection
+ ' Return MainCollection("Cal", "General_Calibers")
+ ' End Function
+ '
+ ' Public Function General_Primer_Type_ManuFacturers() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "General_Primer")
+ ' End Function
+ '
+ ' Public Function General_Primer_Type_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "General_Primer")
+ ' End Function
+ '
+ ' Public Function General_Primer_Type_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "General_Primer")
+ ' End Function
+ '
+ ' Public Function General_Powder_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "General_Powder")
+ ' End Function
+ '
+ ' Public Function General_Powder_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "General_Powder")
+ ' End Function
+ '
+ ' Public Function General_Powder_WeightInPounds() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("weightlbs", "General_Powder")
+ ' End Function
+ '
+ ' Public Function General_Powder_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "General_Powder")
+ ' End Function
+ ' '
+ ' 'Public Function List_Bullets_Manufacturer() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Manufacturer", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Name() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Name", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Diameter() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Diameter", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Sec_Den() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Sec_Den", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Part_number() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Part_number", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Ballistic_Coefficient() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Ballistic_Coefficient", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Price() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Price", "List_Bullets")
+ ' 'End Function
+ ' '
+ ' 'Public Function List_Bullets_Weight() As AutoCompleteStringCollection
+ ' ' Return MainCollectionDistinct("Weight", "List_Bullets")
+ ' 'End Function
+ '
+ ' Public Function List_Case_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "List_Case")
+ ' End Function
+ '
+ ' Public Function List_Case_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "List_Case")
+ ' End Function
+ '
+ ' Public Function List_Case_Trim_to_length() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("ttl", "List_Case")
+ ' End Function
+ '
+ ' Public Function List_Case_Price() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Price", "List_Case")
+ ' End Function
+ '
+ ' Public Function General_Equipment_Manufacturer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Manufacturer", "General_Equipment")
+ ' End Function
+ '
+ ' Public Function General_Equipment_Name() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Name", "General_Equipment")
+ ' End Function
+ '
+ ' Public Function General_Equipment_Use() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Use", "General_Equipment")
+ ' End Function
+ '
+ ' Public Function General_Equipment_Cost() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Cost", "General_Equipment")
+ ' End Function
+ '
+ ' Public Function ConfigName() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("ConfigName", "Config_List_Name")
+ ' End Function
+ '
+ ' Public Function Config_Source_NSG() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("Source", "Config_List_Data_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_GroupSize() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("gs", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_Powder() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("pwm", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_Bullet() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("bullet", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_primer() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("primer", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_case() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("case", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_conditions() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("conditions", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_tl() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("tl", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_notes() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("notes", "Loaders_Log_NSG")
+ ' End Function
+ '
+ ' Public Function Loaders_Log_NSG_ConfigName() As AutoCompleteStringCollection
+ ' Return MainCollectionDistinct("ConfigName", "Loaders_Log_NSG")
+ ' End Function
- End Class
+ 'End Class
Public Class GlobalFunctions
'
'Public Function DatabaseVersion() As Double
@@ -994,18 +999,18 @@ Namespace LoadersClass
' End Try
' Return lAns
'End Function
-
- Public Function GetTitle(ByVal lngID As Long) As String
- Dim sAns As String = ""
- sAns = GetName("SELECT * from Config_List_Name where ID=" & lngID, "ConfigName")
- Return sAns
- End Function
-
- Public Function GetAmmoTypeID(ByVal sName) As Long
- Dim lAns As Long = 0
- lAns = GetID("SELECT ID from General_Ammunition_Type where FType='" & sName & "'")
- Return lAns
- End Function
+ '
+ 'Public Function GetTitle(ByVal lngID As Long) As String
+ ' Dim sAns As String = ""
+ ' sAns = GetName("SELECT * from Config_List_Name where ID=" & lngID, "ConfigName")
+ ' Return sAns
+ 'End Function
+ '
+ 'Public Function GetAmmoTypeID(ByVal sName) As Long
+ ' Dim lAns As Long = 0
+ ' lAns = GetID("SELECT ID from General_Ammunition_Type where FType='" & sName & "'")
+ ' Return lAns
+ 'End Function
Public Function GetAmmoTypeIDSG(ByVal sName) As Long
Dim lAns As Long = 0
@@ -1090,33 +1095,33 @@ Namespace LoadersClass
Err.Number, ex.Message.ToString)
End Try
End Sub
-
- Public Function GetFirearmID(ByVal Fullname As String) As Long
- Dim lAns As Long = 0
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "Select ID from Loaders_Log_Firearms where FullName='" & Fullname & "'"
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- lAns = RS("id")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Catch ex As Exception
- 'Dim strform As String = "LoadersClass.GlobalFunctions"
- 'Dim strProcedure As String = "GetFirearmID"
- 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
- 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "GetFirearmID",
- Err.Number, ex.Message.ToString)
- End Try
- Return lAns
- End Function
+ '
+ 'Public Function GetFirearmID(ByVal Fullname As String) As Long
+ ' Dim lAns As Long = 0
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim SQL As String = "Select ID from Loaders_Log_Firearms where FullName='" & Fullname & "'"
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' While RS.Read
+ ' lAns = RS("id")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Catch ex As Exception
+ ' 'Dim strform As String = "LoadersClass.GlobalFunctions"
+ ' 'Dim strProcedure As String = "GetFirearmID"
+ ' 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
+ ' 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "GetFirearmID",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return lAns
+ 'End Function
Public Function GetGaugeID(ByVal Fullname As String) As Long
Dim lAns As Long = 0
Try
@@ -1143,49 +1148,54 @@ Namespace LoadersClass
End Try
Return lAns
End Function
- Public Function TotalConfigByCal(ByVal lCalID As Long) As Long
- Dim iAns As Integer = 0
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT Count(*) as Total from qry_CFG_SR_PowderList where MyCalID=" & lCalID
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- iAns = RS("Total")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call Obj.CloseDB()
- Catch ex As Exception
- 'Dim strform As String = "LoadersClass.GlobalFunctions"
- 'Dim strProcedure As String = "TotalConfigByCal"
- 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
- 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "TotalConfigByCal",
- Err.Number, ex.Message.ToString)
- End Try
- Return iAns
- End Function
- Function IsShotGunCOnfig(ByVal iCal As Long) As Boolean
- Dim bAns As Boolean = False
- bAns = ObjectExistsinDB(CInt(iCal), "Id", "qry_ConfigCal_SG")
- Return bAns
- End Function
+ '
+ 'Public Function TotalConfigByCal(ByVal lCalID As Long) As Long
+ ' Dim iAns As Integer = 0
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim SQL As String = "SELECT Count(*) as Total from qry_CFG_SR_PowderList where MyCalID=" & lCalID
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' While RS.Read
+ ' iAns = RS("Total")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Call Obj.CloseDB()
+ ' Catch ex As Exception
+ ' 'Dim strform As String = "LoadersClass.GlobalFunctions"
+ ' 'Dim strProcedure As String = "TotalConfigByCal"
+ ' 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
+ ' 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "TotalConfigByCal",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return iAns
+ 'End Function
+ '
+ 'Function IsShotGunCOnfig(ByVal iCal As Long) As Boolean
+ ' Dim bAns As Boolean = False
+ ' bAns = ObjectExistsinDB(CInt(iCal), "Id", "qry_ConfigCal_SG")
+ ' Return bAns
+ 'End Function
+
Function FormatForXML(ByVal sValue As String) As String
Dim sAns As String = ""
sAns = Replace(sValue, "&", "&")
Return sAns
End Function
+
Function FormatFromXML(ByVal sValue As String) As String
Dim sAns As String = ""
sAns = Replace(sValue, "&", "&")
sAns = Replace(sAns, "'", "''")
Return sAns
End Function
+
Public Function IsSlugConfig(ByVal BID As String) As Boolean
Dim bAns As Boolean = False
Try
@@ -1212,110 +1222,113 @@ Namespace LoadersClass
End Try
Return bAns
End Function
- Private Function InSG(ByVal lCALID As Long) As Boolean
- Dim bAns As Boolean = False
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT Config_List_Name.ID,Config_List_Name.ConfigName,Config_List_Name.IsPersonal,Config_List_Name.IsActive,Config_List_Name.IsFav,Config_List_Name.IsShotgun, Config_List_Data_SG.ATID,Config_List_Data_SG.CALID,Config_List_Data_SG.PRID,Config_List_Data_SG.CAID,Config_List_Data_SG.SW,Config_List_Data_SG.SS,Config_List_Data_SG.WAD,Config_List_Data_SG.SCL,Config_List_Data_SG.GID,Config_List_Data_SG.LTID from Config_List_Name INNER JOIN Config_List_Data_SG on Config_List_Data_SG.CLNID=Config_List_Name.ID " & _
- "where Config_List_Data_SG.ATID=" & lCALID & " order by Config_List_Name.ConfigName ASC"
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- bAns = RS.HasRows
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Catch ex As Exception
- 'Dim strform As String = "LoadersClass.GlobalFunctions"
- 'Dim strProcedure As String = "InSG"
- 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
- 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "InSG",
- Err.Number, ex.Message.ToString)
- End Try
- Return bAns
- End Function
- Private Function InRP(ByVal lCALID As Long) As Boolean
- Dim bAns As Boolean = False
- Try
- Dim Obj As New BSDatabase
- Call Obj.ConnectDB()
- Dim SQL As String = "SELECT Config_List_Name.ID,Config_List_Name.ConfigName,Config_List_Name.IsPersonal,Config_List_Name.IsActive,Config_List_Name.IsFav,Config_List_Name.IsShotgun, " & _
- "Config_List_Data_NSG.ATID, Config_List_Data_NSG.CALID,Config_List_Data_NSG.CAID, Config_List_Data_NSG.BID, " & _
- "Config_List_Data_NSG.PRID from Config_List_Name INNER JOIN Config_List_Data_NSG on " & _
- "Config_List_Data_NSG.CLNID=Config_List_Name.ID where Config_List_Data_NSG.CALID=" & lCALID & " order by Config_List_Name.ConfigName ASC"
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- bAns = RS.HasRows
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Catch ex As Exception
- 'Dim strform As String = "LoadersClass.GlobalFunctions"
- 'Dim strProcedure As String = "InRP"
- 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
- 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "InRP",
- Err.Number, ex.Message.ToString)
- End Try
- Return bAns
- End Function
- Public Function IsNotInShotgunConfigbyCal(ByVal lCALID As Long) As Boolean
- Dim bAns As Boolean = False
- Try
- If Not InRP(lCALID) Then
- If InSG(lCALID) Then
- bAns = False
- Else
- bAns = True
- End If
- Else
- bAns = True
- End If
- Catch ex As Exception
- 'Dim strform As String = "LoadersClass.GlobalFunctions"
- 'Dim strProcedure As String = "IsNotInShotgunConfigbyCal"
- 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
- 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "IsNotInShotgunConfigbyCal",
- Err.Number, ex.Message.ToString)
- End Try
- Return bAns
- End Function
- End Class
-
- Public Class BSMGC
- Private _RegPath As String
- Public Conn As OdbcConnection
-
- Public Property DefaultRegPath() As String
- Get
- Return "Software\\BurnSoft\\BSMGC"
- End Get
- Set(ByVal value As String)
- _RegPath = value
- End Set
- End Property
-
- Public Function MyGunCollectionIsInstalled() As Boolean
- Dim bAns As Boolean = False
- Dim MyReg As RegistryKey
- Dim strValue As String = DefaultRegPath
- On Error Resume Next
- MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
- If MyReg Is Nothing Then
- bAns = False
- Else
- bAns = True
- End If
- Return bAns
- Return bAns
- End Function
+ '
+ 'Private Function InSG(ByVal lCALID As Long) As Boolean
+ ' Dim bAns As Boolean = False
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim SQL As String = "SELECT Config_List_Name.ID,Config_List_Name.ConfigName,Config_List_Name.IsPersonal,Config_List_Name.IsActive,Config_List_Name.IsFav,Config_List_Name.IsShotgun, Config_List_Data_SG.ATID,Config_List_Data_SG.CALID,Config_List_Data_SG.PRID,Config_List_Data_SG.CAID,Config_List_Data_SG.SW,Config_List_Data_SG.SS,Config_List_Data_SG.WAD,Config_List_Data_SG.SCL,Config_List_Data_SG.GID,Config_List_Data_SG.LTID from Config_List_Name INNER JOIN Config_List_Data_SG on Config_List_Data_SG.CLNID=Config_List_Name.ID " & _
+ ' "where Config_List_Data_SG.ATID=" & lCALID & " order by Config_List_Name.ConfigName ASC"
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' bAns = RS.HasRows
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Catch ex As Exception
+ ' 'Dim strform As String = "LoadersClass.GlobalFunctions"
+ ' 'Dim strProcedure As String = "InSG"
+ ' 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
+ ' 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "InSG",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return bAns
+ 'End Function
+ '
+ 'Private Function InRP(ByVal lCALID As Long) As Boolean
+ ' Dim bAns As Boolean = False
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Call Obj.ConnectDB()
+ ' Dim SQL As String = "SELECT Config_List_Name.ID,Config_List_Name.ConfigName,Config_List_Name.IsPersonal,Config_List_Name.IsActive,Config_List_Name.IsFav,Config_List_Name.IsShotgun, " & _
+ ' "Config_List_Data_NSG.ATID, Config_List_Data_NSG.CALID,Config_List_Data_NSG.CAID, Config_List_Data_NSG.BID, " & _
+ ' "Config_List_Data_NSG.PRID from Config_List_Name INNER JOIN Config_List_Data_NSG on " & _
+ ' "Config_List_Data_NSG.CLNID=Config_List_Name.ID where Config_List_Data_NSG.CALID=" & lCALID & " order by Config_List_Name.ConfigName ASC"
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' bAns = RS.HasRows
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Catch ex As Exception
+ ' 'Dim strform As String = "LoadersClass.GlobalFunctions"
+ ' 'Dim strProcedure As String = "InRP"
+ ' 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
+ ' 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "InRP",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return bAns
+ 'End Function
+ '
+ 'Public Function IsNotInShotgunConfigbyCal(ByVal lCALID As Long) As Boolean
+ ' Dim bAns As Boolean = False
+ ' Try
+ ' If Not InRP(lCALID) Then
+ ' If InSG(lCALID) Then
+ ' bAns = False
+ ' Else
+ ' bAns = True
+ ' End If
+ ' Else
+ ' bAns = True
+ ' End If
+ ' Catch ex As Exception
+ ' 'Dim strform As String = "LoadersClass.GlobalFunctions"
+ ' 'Dim strProcedure As String = "IsNotInShotgunConfigbyCal"
+ ' 'Dim ObjFS As New BSMyLoadersLog.LoadersClass.BSFileSystem
+ ' 'Dim sMessage As String = strform & "." & strProcedure & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "IsNotInShotgunConfigbyCal",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ ' Return bAns
+ 'End Function
+ End Class
+
+ Public Class BSMGC
+ Private _RegPath As String
+ Public Conn As OdbcConnection
+ '
+ 'Public Property DefaultRegPath() As String
+ ' Get
+ ' Return "Software\\BurnSoft\\BSMGC"
+ ' End Get
+ ' Set(ByVal value As String)
+ ' _RegPath = value
+ ' End Set
+ 'End Property
+ '
+ 'Public Function MyGunCollectionIsInstalled() As Boolean
+ ' Dim bAns As Boolean = False
+ ' Dim MyReg As RegistryKey
+ ' Dim strValue As String = DefaultRegPath
+ ' On Error Resume Next
+ ' MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
+ ' If MyReg Is Nothing Then
+ ' bAns = False
+ ' Else
+ ' bAns = True
+ ' End If
+ ' Return bAns
+ ' Return bAns
+ 'End Function
Public Function sConnect() As String
Dim sAns As String = ""
@@ -1367,49 +1380,49 @@ Namespace LoadersClass
Err.Number, ex.Message.ToString)
End Try
End Sub
-
- Public Function GetMGCPath() As String
- Dim sAns As String = ""
- Dim MyReg As RegistryKey
- Dim strValue As String = DefaultRegPath
- MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
- If MyReg Is Nothing Then
- MyReg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(strValue)
- End If
- sAns = MyReg.GetValue("DataBase", "")
- MyReg.Close()
- Return sAns
- End Function
-
- Public Function GetMGCEXEPath() As String
- Dim sAns As String = ""
- Dim MyReg As RegistryKey
- Dim strValue As String = DefaultRegPath
- MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
- If MyReg Is Nothing Then
- MyReg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(strValue)
- End If
- sAns = MyReg.GetValue("AppEXE", "")
- MyReg.Close()
- Return sAns
- End Function
-
- Public Function CountFirearms() As Integer
- Dim iAns As Integer = 0
- Call ConnectDB()
- Dim SQL As String = "SELECT Count(*) as Total from Gun_Collection where ItemSold=0"
- Dim CMD As New OdbcCommand(SQL, Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- iAns = RS("Total")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Call CloseDB()
- Return ians
- End Function
+ '
+ 'Public Function GetMGCPath() As String
+ ' Dim sAns As String = ""
+ ' Dim MyReg As RegistryKey
+ ' Dim strValue As String = DefaultRegPath
+ ' MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
+ ' If MyReg Is Nothing Then
+ ' MyReg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(strValue)
+ ' End If
+ ' sAns = MyReg.GetValue("DataBase", "")
+ ' MyReg.Close()
+ ' Return sAns
+ 'End Function
+ '
+ 'Public Function GetMGCEXEPath() As String
+ ' Dim sAns As String = ""
+ ' Dim MyReg As RegistryKey
+ ' Dim strValue As String = DefaultRegPath
+ ' MyReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strValue, True)
+ ' If MyReg Is Nothing Then
+ ' MyReg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(strValue)
+ ' End If
+ ' sAns = MyReg.GetValue("AppEXE", "")
+ ' MyReg.Close()
+ ' Return sAns
+ 'End Function
+ '
+ 'Public Function CountFirearms() As Integer
+ ' Dim iAns As Integer = 0
+ ' Call ConnectDB()
+ ' Dim SQL As String = "SELECT Count(*) as Total from Gun_Collection where ItemSold=0"
+ ' Dim CMD As New OdbcCommand(SQL, Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' While RS.Read
+ ' iAns = RS("Total")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Call CloseDB()
+ ' Return ians
+ 'End Function
Public Function ObjectExistsinDB(ByVal strObject As String, ByVal strField As String, ByVal strTable As String) As Boolean
Try
@@ -1496,12 +1509,12 @@ Namespace LoadersClass
End If
Return iAns
End Function
-
- Public Function GetManufacturersName(ByVal strValue As String) As String
- Dim SQL As String = "SELECT Brand from Gun_Manufacturer where ID=" & strValue
- Dim sAns As String = GetName(SQL, "Brand")
- Return sAns
- End Function
+ '
+ 'Public Function GetManufacturersName(ByVal strValue As String) As String
+ ' Dim SQL As String = "SELECT Brand from Gun_Manufacturer where ID=" & strValue
+ ' Dim sAns As String = GetName(SQL, "Brand")
+ ' Return sAns
+ 'End Function
Public Function GetModelID(ByVal strValue As String, ByVal StrValueID As Long) As Long
Dim SQL As String = "SELECT ID from Gun_Model where Model='" & strValue & "' and GMID=" & StrValueID
@@ -1565,21 +1578,21 @@ Namespace LoadersClass
Err.Number, ex.Message.ToString)
End Try
End Function
-
- Public Sub UpdateGunType(ByVal strType As String)
- Try
- If Not ObjectExistsinDB(strType, "Type", "Gun_Type") Then
- Dim SQL As String = "INSERT INTO Gun_Type(Type) VALUES('" & strType & "')"
- ConnExec(SQL)
- End If
- Catch ex As Exception
- 'Dim ObjFS As New BSFileSystem
- 'Dim sMessage As String = "LoadersClass.BSMGC.UpdateGunType" & "::" & Err.Number & "::" & ex.Message.ToString()
- 'ObjFS.LogFile(MyLogFile, sMessage)
- Call LogError("LoadersClass", "UpdateGunType",
- Err.Number, ex.Message.ToString)
- End Try
- End Sub
+ '
+ 'Public Sub UpdateGunType(ByVal strType As String)
+ ' Try
+ ' If Not ObjectExistsinDB(strType, "Type", "Gun_Type") Then
+ ' Dim SQL As String = "INSERT INTO Gun_Type(Type) VALUES('" & strType & "')"
+ ' ConnExec(SQL)
+ ' End If
+ ' Catch ex As Exception
+ ' 'Dim ObjFS As New BSFileSystem
+ ' 'Dim sMessage As String = "LoadersClass.BSMGC.UpdateGunType" & "::" & Err.Number & "::" & ex.Message.ToString()
+ ' 'ObjFS.LogFile(MyLogFile, sMessage)
+ ' Call LogError("LoadersClass", "UpdateGunType",
+ ' Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
Public Function CaliberExists(ByVal strCaliber As String) As Boolean
Return ObjectExistsinDB(strCaliber, "Cal", "Gun_Cal")
@@ -1610,28 +1623,28 @@ Namespace LoadersClass
Call ConnExec(SQL)
If Not CaliberExists(Cal) Then ConnExec("INSERT INTO Gun_Cal (Cal) VALUES('" & Cal & "')")
End Sub
-
- Public Function AmmoIsAlreadyListed(ByVal Manufacturer As String, ByVal Name As String, _
- ByVal Cal As String, ByVal Grain As String, ByVal Jacket As String, Optional ByRef Qty As Long = 0, Optional ByRef MID As Long = 0)
- Dim bAns As Boolean = False
- Call ConnectDB()
- Dim SQL As String = "SELECT * from Gun_Collection_Ammo where Manufacturer='" & _
- Manufacturer & "' and Name='" & Name & "' and Cal='" & Cal & _
- "' and Grain='" & Grain & "' and Jacket='" & Jacket & "'"
- Dim CMD As New OdbcCommand(SQL, Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- bAns = RS.HasRows
- While RS.Read
- Qty = RS("qty")
- MID = RS("ID")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- CloseDB()
- Return bAns
- End Function
+ '
+ ' Public Function AmmoIsAlreadyListed(ByVal Manufacturer As String, ByVal Name As String, _
+ 'ByVal Cal As String, ByVal Grain As String, ByVal Jacket As String, Optional ByRef Qty As Long = 0, Optional ByRef MID As Long = 0)
+ ' Dim bAns As Boolean = False
+ ' Call ConnectDB()
+ ' Dim SQL As String = "SELECT * from Gun_Collection_Ammo where Manufacturer='" & _
+ ' Manufacturer & "' and Name='" & Name & "' and Cal='" & Cal & _
+ ' "' and Grain='" & Grain & "' and Jacket='" & Jacket & "'"
+ ' Dim CMD As New OdbcCommand(SQL, Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' bAns = RS.HasRows
+ ' While RS.Read
+ ' Qty = RS("qty")
+ ' MID = RS("ID")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' CloseDB()
+ ' Return bAns
+ ' End Function
End Class
Public Class InventoryMath
''''
@@ -1649,31 +1662,31 @@ Namespace LoadersClass
''' Just pass the Configuration ID to this function
'''
'''
-
- Function GetPrefNSGPowderID(ByVal ConfigID As Long, Optional ByRef DefaultPowderLoad As Double = 0, Optional ByRef DefaultFPS As Double = 0) As Long
- Dim iAns As Integer = 0
- Try
- Dim Obj As New BSDatabase
- Dim SQL As String = "SELECT PID,Load_Mid,FPS_MID from Config_List_Powder_Data_NSG where IsPref=1 and CLNID=" & ConfigID
- Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- While RS.Read
- iAns = RS("PID")
- DefaultPowderLoad = RS("Load_Mid")
- DefaultFPS = RS("FPS_MID")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- Call LogError("LoadersClass.InventoryMath", "GetPrefNSGPowderID",
- Err.Number, ex.Message.ToString())
- End Try
- Return iAns
- End Function
+ '
+ 'Function GetPrefNSGPowderID(ByVal ConfigID As Long, Optional ByRef DefaultPowderLoad As Double = 0, Optional ByRef DefaultFPS As Double = 0) As Long
+ ' Dim iAns As Integer = 0
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Dim SQL As String = "SELECT PID,Load_Mid,FPS_MID from Config_List_Powder_Data_NSG where IsPref=1 and CLNID=" & ConfigID
+ ' Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' While RS.Read
+ ' iAns = RS("PID")
+ ' DefaultPowderLoad = RS("Load_Mid")
+ ' DefaultFPS = RS("FPS_MID")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Obj.CloseDB()
+ ' Catch ex As Exception
+ ' Call LogError("LoadersClass.InventoryMath", "GetPrefNSGPowderID",
+ ' Err.Number, ex.Message.ToString())
+ ' End Try
+ ' Return iAns
+ 'End Function
'''
''' Get the Powder ID ( OID ) from the Config_List_Powder_Data_SG Table for Shotguns
''' and returns the ID along with the Default Powder Load ( byref DefaultPowderLoad ) value.
@@ -1977,36 +1990,36 @@ Namespace LoadersClass
'''
'''
'''
-
- Public Sub LoadCaseInfo(ByVal lngID As Long, Optional ByRef Manufacturer As String = "", _
- Optional ByRef Name As String = "", Optional ByRef Trim2length As String = "", _
- Optional ByRef TimesUsed As String = "0", Optional ByRef lQty As Long = 0, _
- Optional ByRef ePPC As Double = 0)
- Try
- Dim Obj As New BSDatabase
- Dim SQL As String = "SELECT * from List_Case where ID=" & lngID
- Call Obj.ConnectDB()
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- Dim intNew As Integer = 0
- While RS.Read
- If Not IsDBNull(RS("Manufacturer")) Then Manufacturer = RS("Manufacturer")
- If Not IsDBNull(RS("Name")) Then Name = RS("Name")
- If Not IsDBNull(RS("ttl")) Then Trim2length = RS("ttl")
- If Not IsDBNull(RS("TimesUsed")) Then TimesUsed = RS("TimesUsed")
- lQty = RS("Qty")
- ePPC = CDbl(RS("ePPC"))
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Catch ex As Exception
- 'Call LogError("LoadCaseInfo", Err.Number, ex.Message.ToString())
- Call LogError("LoadersClass.InventoryMath", "LoadCaseInfo",
- Err.Number, ex.Message.ToString())
- End Try
- End Sub
+ '
+ 'Public Sub LoadCaseInfo(ByVal lngID As Long, Optional ByRef Manufacturer As String = "", _
+ ' Optional ByRef Name As String = "", Optional ByRef Trim2length As String = "", _
+ ' Optional ByRef TimesUsed As String = "0", Optional ByRef lQty As Long = 0, _
+ ' Optional ByRef ePPC As Double = 0)
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Dim SQL As String = "SELECT * from List_Case where ID=" & lngID
+ ' Call Obj.ConnectDB()
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' Dim intNew As Integer = 0
+ ' While RS.Read
+ ' If Not IsDBNull(RS("Manufacturer")) Then Manufacturer = RS("Manufacturer")
+ ' If Not IsDBNull(RS("Name")) Then Name = RS("Name")
+ ' If Not IsDBNull(RS("ttl")) Then Trim2length = RS("ttl")
+ ' If Not IsDBNull(RS("TimesUsed")) Then TimesUsed = RS("TimesUsed")
+ ' lQty = RS("Qty")
+ ' ePPC = CDbl(RS("ePPC"))
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Catch ex As Exception
+ ' 'Call LogError("LoadCaseInfo", Err.Number, ex.Message.ToString())
+ ' Call LogError("LoadersClass.InventoryMath", "LoadCaseInfo",
+ ' Err.Number, ex.Message.ToString())
+ ' End Try
+ 'End Sub
'''
''' Get the Shull/shotgun Case information by passing the Case ID and optionally getting the Manufacturer,
''' Name, Trim to Length, Current Qty, Estimated Price Per Case, and DRAM
@@ -2160,124 +2173,128 @@ Namespace LoadersClass
Err.Number, ex.Message.ToString())
End Try
End Sub
+ ''''
+ ''''
+ ''''
+ ''''
+ '
+ 'Public Function ConvertToDollars(ByVal dValue As Double) As Double
+ ' Dim dAns As Double = 0
+ ' dAns = Math.Round(dValue, 2)
+ ' Return dAns
+ 'End Function
'''
'''
'''
'''
-
- Public Function ConvertToDollars(ByVal dValue As Double) As Double
- Dim dAns As Double = 0
- dAns = Math.Round(dValue, 2)
- Return dAns
- End Function
- '''
- '''
- '''
- '''
- Public Sub ARUNSG_UpdateInventoryQty(ByVal lQty As Long, ByVal lQBullet As Long, ByVal BID As Long, ByVal lQPrimer As Long, _
- ByVal PRID As Long, ByVal lQCase As Long, ByVal CID As Long, ByVal dQPowder As Double, ByVal PPID As Long, ByVal dGrainsUses As Double)
- Try
- Dim lNewBullet As Long = lQBullet - lQty
- Dim lNewCase As Long = lQCase - lQty
- Dim lNewPrimer As Long = lQPrimer - lQty
- Dim lNewPowder As Double = dQPowder - (dGrainsUses * lQty)
- Dim dPounds As Double = Math.Round(lNewPowder / WeightGrains1Lbs, 3)
- Dim Obj As New BSDatabase
- Dim SQL As String = "UPDATE List_Bullets set Qty=" & lNewBullet & " where ID=" & BID
- Obj.ConnExec(SQL)
- SQL = "UPDATE List_Case set Qty=" & lNewCase & " where id=" & CID
- Obj.ConnExec(SQL)
- SQL = "UPDATE General_Primer set Qty=" & lNewPrimer & " where id=" & PRID
- Obj.ConnExec(SQL)
- SQL = "UPDATE General_Powder set weightgn=" & lNewPowder & ",weightlbs=" & dPounds & " where id=" & PPID
- Obj.ConnExec(SQL)
- Catch ex As Exception
- 'Call LogError("ARUNSG_UpdateInventoryQty", Err.Number, ex.Message.ToString())
- Call LogError("LoadersClass.InventoryMath", "ARUNSG_UpdateInventoryQty",
- Err.Number, ex.Message.ToString())
- End Try
- End Sub
+ '
+ 'Public Sub ARUNSG_UpdateInventoryQty(ByVal lQty As Long, ByVal lQBullet As Long, ByVal BID As Long, ByVal lQPrimer As Long, _
+ ' ByVal PRID As Long, ByVal lQCase As Long, ByVal CID As Long, ByVal dQPowder As Double, ByVal PPID As Long, ByVal dGrainsUses As Double)
+ ' Try
+ ' Dim lNewBullet As Long = lQBullet - lQty
+ ' Dim lNewCase As Long = lQCase - lQty
+ ' Dim lNewPrimer As Long = lQPrimer - lQty
+ ' Dim lNewPowder As Double = dQPowder - (dGrainsUses * lQty)
+ ' Dim dPounds As Double = Math.Round(lNewPowder / WeightValues.WEIGHT_GRAINS_1LBS, 3)
+ ' Dim Obj As New BSDatabase
+ ' Dim SQL As String = "UPDATE List_Bullets set Qty=" & lNewBullet & " where ID=" & BID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE List_Case set Qty=" & lNewCase & " where id=" & CID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE General_Primer set Qty=" & lNewPrimer & " where id=" & PRID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE General_Powder set weightgn=" & lNewPowder & ",weightlbs=" & dPounds & " where id=" & PPID
+ ' Obj.ConnExec(SQL)
+ ' Catch ex As Exception
+ ' 'Call LogError("ARUNSG_UpdateInventoryQty", Err.Number, ex.Message.ToString())
+ ' Call LogError("LoadersClass.InventoryMath", "ARUNSG_UpdateInventoryQty",
+ ' Err.Number, ex.Message.ToString())
+ ' End Try
+ 'End Sub
'''
'''
'''
'''
- Public Sub ARUSG_UpdateInventoryQty(ByVal lQty As Long, ByVal lQBullet As Long, ByVal BID As Long, ByVal lQPrimer As Long, _
- ByVal PRID As Long, ByVal lQCase As Long, ByVal CID As Long, ByVal dQPowder As Double, ByVal PPID As Long, _
- ByVal dGrainsUses As Double, ByVal lQWADS As Long, ByVal WID As Long, ByVal IsSlug As Boolean, _
- ByVal lQSHOT_OZ As Double, ByVal lQSHOT_GR As Double, ByVal dQPrefLoad As Double)
- Try
- Dim lNewBullet As Long = 0
- Dim lNewCase As Long = lQCase - lQty
- Dim lNewPrimer As Long = lQPrimer - lQty
- Dim lNewWad As Long = lQWADS - lQty
- Dim lNewPowder As Double = dQPowder - (dGrainsUses * lQty)
- Dim dPounds As Double = Math.Round(lNewPowder / WeightGrains1Lbs, 3)
- Dim dNewShotGrans As Double = 0
- Dim dNewShotOz As Double = 0
- Dim dNewShotLBS As Double = 0
- Dim Obj As New BSDatabase
- Dim SQL As String = ""
- If IsSlug Then
- lNewBullet = lQBullet - lQty
- SQL = "UPDATE List_SG_ShotType_Details set Qty=" & lNewBullet & " where ID=" & BID
- Else
- dNewShotOz = lQSHOT_OZ - (dQPrefLoad * lQty)
- dNewShotGrans = dNewShotOz * WeightGramsOz
- dNewShotLBS = dNewShotOz / WeightOz1Lbs
- SQL = "UPDATE List_SG_ShotType_Details set weight=" & dNewShotLBS & _
- ", ounces=" & dNewShotOz & ", grams=" & dNewShotGrans & " where ID=" & BID
- End If
- Obj.ConnExec(SQL)
- SQL = "UPDATE List_SG_WAD set Qty=" & lNewWad & " where id=" & WID
- Obj.ConnExec(SQL)
- SQL = "UPDATE List_SG_Case set Qty=" & lNewCase & " where id=" & CID
- Obj.ConnExec(SQL)
- SQL = "UPDATE General_Primer set Qty=" & lNewPrimer & " where id=" & PRID
- Obj.ConnExec(SQL)
- SQL = "UPDATE General_Powder set weightgn=" & lNewPowder & ",weightlbs=" & dPounds & " where id=" & PPID
- Obj.ConnExec(SQL)
- Catch ex As Exception
- 'Call LogError("ARUSG_UpdateInventoryQty", Err.Number, ex.Message.ToString())
- Call LogError("LoadersClass.InventoryMath", "ARUSG_UpdateInventoryQty",
- Err.Number, ex.Message.ToString())
- End Try
- End Sub
+ '
+ 'Public Sub ARUSG_UpdateInventoryQty(ByVal lQty As Long, ByVal lQBullet As Long, ByVal BID As Long, ByVal lQPrimer As Long, _
+ ' ByVal PRID As Long, ByVal lQCase As Long, ByVal CID As Long, ByVal dQPowder As Double, ByVal PPID As Long, _
+ ' ByVal dGrainsUses As Double, ByVal lQWADS As Long, ByVal WID As Long, ByVal IsSlug As Boolean, _
+ ' ByVal lQSHOT_OZ As Double, ByVal lQSHOT_GR As Double, ByVal dQPrefLoad As Double)
+ ' Try
+ ' Dim lNewBullet As Long = 0
+ ' Dim lNewCase As Long = lQCase - lQty
+ ' Dim lNewPrimer As Long = lQPrimer - lQty
+ ' Dim lNewWad As Long = lQWADS - lQty
+ ' Dim lNewPowder As Double = dQPowder - (dGrainsUses * lQty)
+ ' Dim dPounds As Double = Math.Round(lNewPowder / WeightValues.WEIGHT_GRAINS_1LBS, 3)
+ ' Dim dNewShotGrans As Double = 0
+ ' Dim dNewShotOz As Double = 0
+ ' Dim dNewShotLBS As Double = 0
+ ' Dim Obj As New BSDatabase
+ ' Dim SQL As String = ""
+ ' If IsSlug Then
+ ' lNewBullet = lQBullet - lQty
+ ' SQL = "UPDATE List_SG_ShotType_Details set Qty=" & lNewBullet & " where ID=" & BID
+ ' Else
+ ' dNewShotOz = lQSHOT_OZ - (dQPrefLoad * lQty)
+ ' dNewShotGrans = dNewShotOz * WeightValues.WEIGHT_GRAMS_OZ
+ ' dNewShotLBS = dNewShotOz / WeightValues.WEIGHT_OZ_1LBS
+ ' SQL = "UPDATE List_SG_ShotType_Details set weight=" & dNewShotLBS & _
+ ' ", ounces=" & dNewShotOz & ", grams=" & dNewShotGrans & " where ID=" & BID
+ ' End If
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE List_SG_WAD set Qty=" & lNewWad & " where id=" & WID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE List_SG_Case set Qty=" & lNewCase & " where id=" & CID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE General_Primer set Qty=" & lNewPrimer & " where id=" & PRID
+ ' Obj.ConnExec(SQL)
+ ' SQL = "UPDATE General_Powder set weightgn=" & lNewPowder & ",weightlbs=" & dPounds & " where id=" & PPID
+ ' Obj.ConnExec(SQL)
+ ' Catch ex As Exception
+ ' 'Call LogError("ARUSG_UpdateInventoryQty", Err.Number, ex.Message.ToString())
+ ' Call LogError("LoadersClass.InventoryMath", "ARUSG_UpdateInventoryQty",
+ ' Err.Number, ex.Message.ToString())
+ ' End Try
+ 'End Sub
'''
'''
'''
'''
- Public Function IsAlreadyListed(ByVal Manufacturer As String, ByVal Name As String, _
- ByVal Cal As String, ByVal Grain As String, ByVal Jacket As String, Optional ByRef Qty As Long = 0, Optional ByRef MID As Long = 0)
- Dim bAns As Boolean = False
- Try
- Dim Obj As New BSDatabase
- Obj.ConnectDB()
- Dim SQL As String = "SELECT * from Loaders_Log_Ammunition where Manufacturer='" & _
- Manufacturer & "' and Name='" & Name & "' and Cal='" & Cal & _
- "' and Grain='" & Grain & "' and Jacket='" & Jacket & "'"
- Dim CMD As New OdbcCommand(SQL, Obj.Conn)
- Dim RS As OdbcDataReader
- RS = CMD.ExecuteReader
- bAns = RS.HasRows
- While RS.Read
- Qty = RS("qty")
- MID = RS("ID")
- End While
- RS.Close()
- RS = Nothing
- CMD = Nothing
- Obj.CloseDB()
- Catch ex As Exception
- 'Call LogError("IsAlreadyListed", Err.Number, ex.Message.ToString())
- Call LogError("LoadersClass.InventoryMath", "IsAlreadyListed",
- Err.Number, ex.Message.ToString())
- End Try
- Return bAns
- End Function
+ '
+ 'Public Function IsAlreadyListed(ByVal Manufacturer As String, ByVal Name As String, _
+ 'ByVal Cal As String, ByVal Grain As String, ByVal Jacket As String, Optional ByRef Qty As Long = 0, Optional ByRef MID As Long = 0)
+ ' Dim bAns As Boolean = False
+ ' Try
+ ' Dim Obj As New BSDatabase
+ ' Obj.ConnectDB()
+ ' Dim SQL As String = "SELECT * from Loaders_Log_Ammunition where Manufacturer='" & _
+ ' Manufacturer & "' and Name='" & Name & "' and Cal='" & Cal & _
+ ' "' and Grain='" & Grain & "' and Jacket='" & Jacket & "'"
+ ' Dim CMD As New OdbcCommand(SQL, Obj.Conn)
+ ' Dim RS As OdbcDataReader
+ ' RS = CMD.ExecuteReader
+ ' bAns = RS.HasRows
+ ' While RS.Read
+ ' Qty = RS("qty")
+ ' MID = RS("ID")
+ ' End While
+ ' RS.Close()
+ ' RS = Nothing
+ ' CMD = Nothing
+ ' Obj.CloseDB()
+ ' Catch ex As Exception
+ ' 'Call LogError("IsAlreadyListed", Err.Number, ex.Message.ToString())
+ ' Call LogError("LoadersClass.InventoryMath", "IsAlreadyListed",
+ ' Err.Number, ex.Message.ToString())
+ ' End Try
+ ' Return bAns
+ 'End Function
'''
'''
'''
'''
+
Public Sub GetPowderDetails(ByVal PID As Long, Optional ByRef Manu As String = "", _
Optional ByRef sName As String = "", Optional ByVal weightlbs As Double = 0, _
Optional ByRef weightgn As Double = 0, Optional ByRef Price As Double = 0, _
diff --git a/BSMyLoadersLog/MDIParentMain.vb b/BSMyLoadersLog/MDIParentMain.vb
index bbed475..98f5a73 100644
--- a/BSMyLoadersLog/MDIParentMain.vb
+++ b/BSMyLoadersLog/MDIParentMain.vb
@@ -1,6 +1,7 @@
-Imports BSMyLoadersLog.LoadersClass
-Imports System.Data.Odbc
+'Imports BSMyLoadersLog.LoadersClass
+'Imports System.Data.Odbc
+'Imports System.Diagnostics.Eventing.Reader
Imports System.IO
Imports BurnSoft.MsgBox
Imports BSMyLoadersLog.Adding
@@ -8,19 +9,24 @@ Imports BurnSoft.Applications.MLL.Global
Imports BurnSoft.Applications.MLL.PeopleAndPlaces
Imports BurnSoft.Applications.MLL.Types
Imports BSMyLoadersLog.Viewing
+Imports BSMyLoadersLog.ViewReports
+'Imports BurnSoft.Applications.MGC
+Imports BurnSoft.Applications.MGC.LoadersLog
+Imports BurnSoft.Applications.MLL.ConfigSheets
Imports BurnSoft.Applications.MLL.Helpers
+Imports BurnSoft.Applications.MLL.Inventory
Imports BurnSoft.Universal
'''
''' Class MdiParentMain.
-''' Implements the
+''' Implements the
'''
-'''
+'''
Public Class MdiParentMain
'''
''' The error out
'''
- Private errOut as String
+ Private _errOut as String
#Region "Form Subs"
'''
''' Handles the Disposed event of the MDIParentMain control.
@@ -31,7 +37,7 @@ Public Class MdiParentMain
Try
If DoAutoBackup Then
Dim myProcess As New Process
- myProcess.StartInfo.FileName = Application.StartupPath & "\" & MyBackup
+ myProcess.StartInfo.FileName = Application.StartupPath & "\" & GeneralSettings.MY_BACKUP
myProcess.StartInfo.Arguments = "/auto"
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.Start()
@@ -40,6 +46,28 @@ Public Class MdiParentMain
Call LogError(Name, "Disposed", Err.Number, ex.Message.ToString)
End Try
End Sub
+ '''
+ ''' Checks the login.
+ '''
+ '''
+ Private Sub CheckLogin()
+ Dim loginInfo as List(Of LoginInformationOnly) = OwnerInformation.LoginEnabled(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim requiredLogin as Boolean = False
+ For Each o As LoginInformationOnly In loginInfo
+ requiredLogin = o.UseLock
+ UseMyPwd = o.Password
+ UseMyUid = o.UserName
+ UseMyForgotWord = o.Forgot
+ UseMyForgotPhrase = o.ForgetPhrase
+ Next
+
+ If requiredLogin And Not IsLoggedIn Then
+ frmLogin.Show()
+ Close()
+ End If
+ End Sub
+
'''
''' Handles the Load event of the MDIParent2 control.
'''
@@ -50,38 +78,39 @@ Public Class MdiParentMain
Lastconfigedviewed = 0
'MyLogFile = Application.StartupPath & "\err.log"
Call CheckforHotFix()
+ Call CheckLogin()
'If LoginEnabled(UseMyPWD, UseMyUID, UseMyForgotWord, UseMyForgotPhrase) And Not IsLoggedIN Then
' frmLogin.Show()
' Close()
'End If
- Dim loginInfo as List(Of LoginInformationOnly) = OwnerInformation.LoginEnabled(DatabasePath, errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
- Dim requiredLogin as Boolean = False
- For Each o As LoginInformationOnly In loginInfo
- requiredLogin = o.UseLock
- UseMyPwd = o.Password
- UseMyUid = o.UserName
- UseMyForgotWord = o.Forgot
- UseMyForgotPhrase = o.ForgetPhrase
- Next
+ 'Dim loginInfo as List(Of LoginInformationOnly) = OwnerInformation.LoginEnabled(DatabasePath, errOut)
+ 'If errOut.Length > 0 Then Throw New Exception(errOut)
+ 'Dim requiredLogin as Boolean = False
+ 'For Each o As LoginInformationOnly In loginInfo
+ ' requiredLogin = o.UseLock
+ ' UseMyPwd = o.Password
+ ' UseMyUid = o.UserName
+ ' UseMyForgotWord = o.Forgot
+ ' UseMyForgotPhrase = o.ForgetPhrase
+ 'Next
- If requiredLogin And Not IsLoggedIn Then
- frmLogin.Show()
- Close()
- End If
- Dim obj As New LoadersClass.BSRegistry
+ 'If requiredLogin And Not IsLoggedIn Then
+ ' frmLogin.Show()
+ ' Close()
+ 'End If
+ 'Dim obj As New LoadersClass.BSRegistry
'OwnerID = GetOwnerID()
- OwnerId = OwnerInformation.GetOwnerID(DatabasePath, errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
+ OwnerId = OwnerInformation.GetOwnerID(DatabasePath, _errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
'Call obj.UpDateAppDetails()
If Not MyRegistry.UpdateAppDetails(Application.ProductVersion, Application.ProductName,
Application.ExecutablePath(), ApplicationPath,
MyLogFile, DatabasePath, ApplicationPathData,
- errOut) Then Throw New Exception(errOut)
+ _errOut) Then Throw New Exception(_errOut)
- Dim regSettings As List(Of RegistrySettings) = MyRegistry.GetSettings(errOut)
- If errOut.Length > 0 Then Throw New Exception(errOut)
+ Dim regSettings As List(Of RegistrySettings) = MyRegistry.GetSettings(_errOut)
+ If _errOut.Length > 0 Then Throw New Exception(_errOut)
For Each o As RegistrySettings In regSettings
LastSucBackup = o.LastSucBackup
AlertOnBackUp = o.AlertOnBackUp
@@ -91,6 +120,8 @@ Public Class MdiParentMain
DoOriginalImage = o.UseOrgImage
UseIndividualReports = o.IndvReports
cmbConfigSort.Text = o.ConfigSort
+ LoaderTypeShotGun = o.LoaderTypeShotGun
+ LoaderTypeMetalic = o.LoaderTypeMetalic
Next
'Call obj.GetSettings(LastSucBackup, AlertOnBackUp, TrackHistoryDays, TrackHistory, DoAutoBackup, DoOriginalImage,
@@ -104,34 +135,19 @@ Public Class MdiParentMain
frmNew.MdiParent = Me
frmNew.Show()
End If
- If Not UseShotgun Then
- ToolStripButton6.Visible = False
- WADListToolStripMenuItem.Visible = False
- ShellListToolStripMenuItem.Visible = False
- ShotListToolStripMenuItem.Visible = False
- SlugListToolStripMenuItem.Visible = False
- BushingsChargeBarToolStripMenuItem.Visible = False
- WADInventoryToolStripMenuItem.Visible = False
- ShellInventoryToolStripMenuItem.Visible = False
- ShotInventoryToolStripMenuItem.Visible = False
- SlugInventoryToolStripMenuItem.Visible = False
- ShotgunsToolStripMenuItem.Visible = False
- ShotgunGaugesToolStripMenuItem.Visible = False
- ShotWeightToolStripMenuItem.Visible = False
-
- End If
'OwnerLoadName = Replace(GetLoadName(), "''", "'")
- OwnerLoadName = Replace(OwnerInformation.GetLoadName(DatabasePath, errOut), "''", "'")
- If OwnerLoadName <> "My Loaders Log" Then Text = OwnerLoadName & " Loaders Log"
+ OwnerLoadName = Replace(OwnerInformation.GetLoadName(DatabasePath, _errOut), "''", "'")
+ If OwnerLoadName <> "My Loaders Log" Then Text = $"{OwnerLoadName} Loaders Log"
Call RefreshData()
Call InitForm()
Call InitLoaderType()
Dim objFs As New FileIO
- If objFs.FileExists(MyHotfixFile) Then ReRunHotfixUpdatesToolStripMenuItem.Enabled = True
+ If objFs.FileExists(GeneralSettings.MY_HOTFIX_FILE) Then ReRunHotfixUpdatesToolStripMenuItem.Enabled = True
Catch ex As Exception
Call LogError(Name, "Load", Err.Number, ex.Message.ToString)
End Try
End Sub
+
'''
''' Handles the Resize event of the MDIParentMain control.
'''
@@ -193,109 +209,164 @@ Public Class MdiParentMain
If Lastconfigedviewed > 0 Then lstConfigSheets.SelectedValue = Lastconfigedviewed
'Dim objR As New BSRegistry
'objR.SaveConfigSort(selectedView)
- If Not MyRegistry.SaveConfigSort(selectedView, errOut) Then Throw New Exception(errOut)
+ If Not MyRegistry.SaveConfigSort(selectedView, _errOut) Then Throw New Exception(_errOut)
Catch ex As Exception
Call LogError(Name, "RefreshConfigData", Err.Number, ex.Message.ToString)
End Try
End Sub
+ ''''
+ '''' Deinits the type of the loader.
+ ''''
+ 'Private Sub DeinitLoaderType()
+ ' BulletToolStripMenuItem.Visible = False
+ ' CaseToolStripMenuItem.Visible = False
+ ' WADToolStripMenuItem.Visible = False
+ ' ShellToolStripMenuItem.Visible = False
+ ' BulletToolStripMenuItem1.Visible = False
+ ' CaseToolStripMenuItem1.Visible = False
+ ' WADListToolStripMenuItem.Visible = False
+ ' ShellListToolStripMenuItem.Visible = False
+ ' ToolStripSeparator7.Visible = False
+ ' ToolStripSeparator10.Visible = False
+ ' ToolStripSeparator13.Visible = False
+ ' ToolStripSeparator14.Visible = False
+ ' ShotgunToolStripMenuItem.Visible = False
+ ' ShotgunToolStripMenuItem1.Visible = False
+ ' RiflePistolToolStripMenuItem.Visible = False
+ ' RiflePistolToolStripMenuItem1.Visible = False
+ ' WADInventoryToolStripMenuItem.Visible = False
+ ' ShellInventoryToolStripMenuItem.Visible = False
+ ' CaseBrassInventoryToolStripMenuItem.Visible = False
+ ' BulletInventoryToolStripMenuItem.Visible = False
+ ' ShotgunGaugesToolStripMenuItem.Visible = False
+ ' ShotWeightToolStripMenuItem.Visible = False
+ ' ShotgunsToolStripMenuItem.Visible = False
+ ' RifleAndPistolsToolStripMenuItem.Visible = False
+ ' ToolStripButton6.Visible = False
+ ' ToolStripButton5.Visible = False
+ ' SlugsToolStripMenuItem.Visible = False
+ ' ShotToolStripMenuItem.Visible = False
+ ' SlugListToolStripMenuItem.Visible = False
+ ' ShotListToolStripMenuItem.Visible = False
+ ' ShotInventoryToolStripMenuItem.Visible = False
+ ' SlugInventoryToolStripMenuItem.Visible = False
+ ' PowderBushingsToolStripMenuItem.Visible = False
+ ' BushingsChargeBarToolStripMenuItem.Visible = False
+ 'End Sub
+ ''''
+ '''' Initializes the reg values.
+ ''''
+ 'Private Sub InitRegValues()
+ ' 'Dim objr As New BSRegistry
+ ' 'Call objr.UpDateAppDetails()
+ ' Try
+ ' If Not MyRegistry.UpdateAppDetails(Application.ProductVersion, Application.ProductName,
+ ' Application.ExecutablePath(), ApplicationPath,
+ ' MyLogFile, DatabasePath, ApplicationPathData,
+ ' errOut) Then Throw New Exception(errOut)
+ ' Catch ex As Exception
+ ' Call LogError(Name, "InitRegValues", Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
+ '''
+ ''' Toggles the shotgun views visible or hidden
+ '''
+ ''' if set to true [status].
+ Sub ToggleShotgunViews(status As Boolean)
+ If LoaderTypeShotGun Then
+ ToolStripSeparator7.Visible = status
+ ToolStripSeparator14.Visible = status
+ WADToolStripMenuItem.Visible = status
+ ShellToolStripMenuItem.Visible = status
+ WADListToolStripMenuItem.Visible = status
+ ShellListToolStripMenuItem.Visible = status
+ ShotgunToolStripMenuItem.Visible = status
+ ShotgunToolStripMenuItem1.Visible = status
+ WADInventoryToolStripMenuItem.Visible = status
+ ShellInventoryToolStripMenuItem.Visible = status
+ ShotgunGaugesToolStripMenuItem.Visible = status
+ ShotWeightToolStripMenuItem.Visible = status
+ ShotgunsToolStripMenuItem.Visible = status
+ ToolStripButton6.Visible = status
+ SlugsToolStripMenuItem.Visible = status
+ ShotToolStripMenuItem.Visible = status
+ SlugListToolStripMenuItem.Visible = status
+ ShotListToolStripMenuItem.Visible = status
+ ShotInventoryToolStripMenuItem.Visible = status
+ SlugInventoryToolStripMenuItem.Visible = status
+ PowderBushingsToolStripMenuItem.Visible = status
+ BushingsChargeBarToolStripMenuItem.Visible = status
+ End If
+ End Sub
'''
- ''' Deinits the type of the loader.
- '''
- Private Sub DeinitLoaderType()
- BulletToolStripMenuItem.Visible = False
- CaseToolStripMenuItem.Visible = False
- WADToolStripMenuItem.Visible = False
- ShellToolStripMenuItem.Visible = False
- BulletToolStripMenuItem1.Visible = False
- CaseToolStripMenuItem1.Visible = False
- WADListToolStripMenuItem.Visible = False
- ShellListToolStripMenuItem.Visible = False
- ToolStripSeparator7.Visible = False
- ToolStripSeparator10.Visible = False
- ToolStripSeparator13.Visible = False
- ToolStripSeparator14.Visible = False
- ShotgunToolStripMenuItem.Visible = False
- ShotgunToolStripMenuItem1.Visible = False
- RiflePistolToolStripMenuItem.Visible = False
- RiflePistolToolStripMenuItem1.Visible = False
- WADInventoryToolStripMenuItem.Visible = False
- ShellInventoryToolStripMenuItem.Visible = False
- CaseBrassInventoryToolStripMenuItem.Visible = False
- BulletInventoryToolStripMenuItem.Visible = False
- ShotgunGaugesToolStripMenuItem.Visible = False
- ShotWeightToolStripMenuItem.Visible = False
- ShotgunsToolStripMenuItem.Visible = False
- RifleAndPistolsToolStripMenuItem.Visible = False
- ToolStripButton6.Visible = False
- ToolStripButton5.Visible = False
- SlugsToolStripMenuItem.Visible = False
- ShotToolStripMenuItem.Visible = False
- SlugListToolStripMenuItem.Visible = False
- ShotListToolStripMenuItem.Visible = False
- ShotInventoryToolStripMenuItem.Visible = False
- SlugInventoryToolStripMenuItem.Visible = False
- PowderBushingsToolStripMenuItem.Visible = False
- BushingsChargeBarToolStripMenuItem.Visible = False
- End Sub
- '''
- ''' Initializes the reg values.
- '''
- Private Sub InitRegValues()
- 'Dim objr As New BSRegistry
- 'Call objr.UpDateAppDetails()
- Try
- If Not MyRegistry.UpdateAppDetails(Application.ProductVersion, Application.ProductName,
- Application.ExecutablePath(), ApplicationPath,
- MyLogFile, DatabasePath, ApplicationPathData,
- errOut) Then Throw New Exception(errOut)
- Catch ex As Exception
- Call LogError(Name, "InitRegValues", Err.Number, ex.Message.ToString)
- End Try
+ ''' Toggles the metalic views visible or hidden
+ '''
+ ''' if set to true [status].
+ Sub ToggleMetalicViews(status As Boolean)
+ If LoaderTypeMetalic Then
+ ToolStripSeparator13.Visible = status
+ ToolStripSeparator10.Visible = status
+ BulletToolStripMenuItem.Visible = status
+ CaseToolStripMenuItem.Visible = status
+ BulletToolStripMenuItem1.Visible = status
+ CaseToolStripMenuItem1.Visible = status
+ RiflePistolToolStripMenuItem.Visible = status
+ RiflePistolToolStripMenuItem1.Visible = status
+ CaseBrassInventoryToolStripMenuItem.Visible = status
+ BulletInventoryToolStripMenuItem.Visible = status
+ RifleAndPistolsToolStripMenuItem.Visible = status
+ ToolStripButton5.Visible = status
+ End If
End Sub
'''
''' Initializes the type of the loader.
'''
Public Sub InitLoaderType()
Try
- Call DeinitLoaderType()
- If LoadertypeShotgun Then
- ToolStripSeparator7.Visible = True
- ToolStripSeparator14.Visible = True
- WADToolStripMenuItem.Visible = True
- ShellToolStripMenuItem.Visible = True
- WADListToolStripMenuItem.Visible = True
- ShellListToolStripMenuItem.Visible = True
- ShotgunToolStripMenuItem.Visible = True
- ShotgunToolStripMenuItem1.Visible = True
- WADInventoryToolStripMenuItem.Visible = True
- ShellInventoryToolStripMenuItem.Visible = True
- ShotgunGaugesToolStripMenuItem.Visible = True
- ShotWeightToolStripMenuItem.Visible = True
- ShotgunsToolStripMenuItem.Visible = True
- ToolStripButton6.Visible = True
- SlugsToolStripMenuItem.Visible = True
- ShotToolStripMenuItem.Visible = True
- SlugListToolStripMenuItem.Visible = True
- ShotListToolStripMenuItem.Visible = True
- ShotInventoryToolStripMenuItem.Visible = True
- SlugInventoryToolStripMenuItem.Visible = True
- PowderBushingsToolStripMenuItem.Visible = True
- BushingsChargeBarToolStripMenuItem.Visible = True
- End If
- If LoadertypeNonshotgun Then
- ToolStripSeparator13.Visible = True
- ToolStripSeparator10.Visible = True
- BulletToolStripMenuItem.Visible = True
- CaseToolStripMenuItem.Visible = True
- BulletToolStripMenuItem1.Visible = True
- CaseToolStripMenuItem1.Visible = True
- RiflePistolToolStripMenuItem.Visible = True
- RiflePistolToolStripMenuItem1.Visible = True
- CaseBrassInventoryToolStripMenuItem.Visible = True
- BulletInventoryToolStripMenuItem.Visible = True
- RifleAndPistolsToolStripMenuItem.Visible = True
- ToolStripButton5.Visible = True
- End If
+ Call ToggleShotgunViews(False)
+ Call ToggleMetalicViews(False)
+ Call ToggleShotgunViews(True)
+ Call ToggleMetalicViews(True)
+ 'Call DeinitLoaderType()
+
+ 'If LoaderTypeShotGun Then
+ ' ToolStripSeparator7.Visible = True
+ ' ToolStripSeparator14.Visible = True
+ ' WADToolStripMenuItem.Visible = True
+ ' ShellToolStripMenuItem.Visible = True
+ ' WADListToolStripMenuItem.Visible = True
+ ' ShellListToolStripMenuItem.Visible = True
+ ' ShotgunToolStripMenuItem.Visible = True
+ ' ShotgunToolStripMenuItem1.Visible = True
+ ' WADInventoryToolStripMenuItem.Visible = True
+ ' ShellInventoryToolStripMenuItem.Visible = True
+ ' ShotgunGaugesToolStripMenuItem.Visible = True
+ ' ShotWeightToolStripMenuItem.Visible = True
+ ' ShotgunsToolStripMenuItem.Visible = True
+ ' ToolStripButton6.Visible = True
+ ' SlugsToolStripMenuItem.Visible = True
+ ' ShotToolStripMenuItem.Visible = True
+ ' SlugListToolStripMenuItem.Visible = True
+ ' ShotListToolStripMenuItem.Visible = True
+ ' ShotInventoryToolStripMenuItem.Visible = True
+ ' SlugInventoryToolStripMenuItem.Visible = True
+ ' PowderBushingsToolStripMenuItem.Visible = True
+ ' BushingsChargeBarToolStripMenuItem.Visible = True
+ 'End If
+ 'If LoaderTypeMetalic Then
+ ' ToolStripSeparator13.Visible = True
+ ' ToolStripSeparator10.Visible = True
+ ' BulletToolStripMenuItem.Visible = True
+ ' CaseToolStripMenuItem.Visible = True
+ ' BulletToolStripMenuItem1.Visible = True
+ ' CaseToolStripMenuItem1.Visible = True
+ ' RiflePistolToolStripMenuItem.Visible = True
+ ' RiflePistolToolStripMenuItem1.Visible = True
+ ' CaseBrassInventoryToolStripMenuItem.Visible = True
+ ' BulletInventoryToolStripMenuItem.Visible = True
+ ' RifleAndPistolsToolStripMenuItem.Visible = True
+ ' ToolStripButton5.Visible = True
+ 'End If
Catch ex As Exception
Call LogError(Name, "InitLoaderType", Err.Number, ex.Message.ToString)
End Try
@@ -305,11 +376,12 @@ Public Class MdiParentMain
'''
Sub InitForm()
Try
- Dim obj As New BSMGC
- If obj.MyGunCollectionIsInstalled Then
+ 'Dim obj As New BSMGC
+ If RegistryHelpers.MyGunCollectionIsInstalled(_errOut) Then
tsslMGCEnabled.Enabled = True
tsslMGCEnabled.Visible = True
- MgcPath = obj.GetMGCPath
+ MgcPath = RegistryHelpers.GetMgcExePath(_errOut)
+ if _errOut.Length > 0 Then Throw new Exception(_errOut)
SaveAsToolStripMenuItem.Enabled = True
ToolStripButton1.Enabled = True
ExportFirearmsToMGCToolStripMenuItem.Enabled = True
@@ -335,7 +407,7 @@ Public Class MdiParentMain
Try
DoAutoBackup = False
Dim myProcess As New Process
- myProcess.StartInfo.FileName = Application.StartupPath & "\" & MyBackup
+ myProcess.StartInfo.FileName = Application.StartupPath & "\" & GeneralSettings.MY_BACKUP
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.Start()
Close()
@@ -350,7 +422,7 @@ Public Class MdiParentMain
Try
DoAutoBackup = False
Dim myProcess As New Process
- myProcess.StartInfo.FileName = Application.StartupPath & "\" & MyRestore
+ myProcess.StartInfo.FileName = Application.StartupPath & "\" & GeneralSettings.MY_RESTORE
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.Start()
Close()
@@ -365,7 +437,7 @@ Public Class MdiParentMain
Dim objf As New FileIO
If objf.FileExists(Application.StartupPath & "\hotfix.ini") Then
Dim myProcess As New Process
- Dim runThiSApp As String = Application.StartupPath & "\" & MyHotfixFile
+ Dim runThiSApp As String = Application.StartupPath & "\" & GeneralSettings.MY_HOTFIX_FILE
myProcess.StartInfo.FileName = runThiSApp
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
DoAutoBackup = False
@@ -378,7 +450,7 @@ Public Class MdiParentMain
'''
Sub DoHelp()
Try
- Help.ShowHelp(Me, MyHelpFile)
+ Help.ShowHelp(Me, GeneralSettings.MY_HELP_FILE)
Catch ex As Exception
Call LogError(Name, "DoHelp", Err.Number, ex.Message.ToString)
End Try
@@ -389,121 +461,113 @@ Public Class MdiParentMain
'''
Sub CheckBackup()
Try
- Dim objR As New LoadersClass.BSRegistry
+ ' TODO: See if this is needed or was replaced.
+ 'Dim objR As New LoadersClass.BSRegistry
If Not AlertOnBackUp Then Exit Sub
Dim myLastDateDiff As Long = DateDiff(DateInterval.Day, CDate(LastSucBackup), DateTime.Now)
Dim obj As New MsgClass
- If myLastDateDiff > TrackHistoryDays Then obj.DoMessage("It has been " & myLastDateDiff & " days since your last backup.", MgboxStyle.Inf_OK, MgBtnStyle.mb_Exclamantion, "Last Backup Notice", , True, "Backup Warning", False)
+ If myLastDateDiff > TrackHistoryDays Then obj.DoMessage($"It has been {myLastDateDiff} days since your last backup.",
+ MgboxStyle.Inf_OK, MgBtnStyle.mb_Exclamantion,
+ "Last Backup Notice", , True, "Backup Warning",
+ False)
Catch ex As Exception
Call LogError(Name, "CheckBackup", Err.Number, ex.Message.ToString)
End Try
End Sub
- '''
- ''' Copies the configuration details NSG.
- '''
- ''' My identifier.
- ''' The configuration identifier.
- Private Sub CopyConfigDetailsNsg(ByVal myId As Long, ByVal configId As Long)
- Try
- Dim sql As String = "SELECT * from Config_List_Data_NSG where CLNID=" & configId
- Dim obj As New BSDatabase
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- sql = "INSERT INTO Config_List_Data_NSG (CLNID,ATID,CALID,BID,PRID,CAID,Source) VALUES(" & _
- myId & "," & rs("ATID") & "," & rs("CALID") & "," & rs("BID") & "," & rs("PRID") & "," & rs("CAID") & ",'" & _
- rs("Source") & "')"
- obj.ConnExec(sql)
- End While
- rs.Close()
- Catch ex As Exception
- Call LogError(Name, "CopyConfigDetailsNSG", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Copies the configuration powders NSG.
- '''
- ''' My identifier.
- ''' The configuration identifier.
- Private Sub CopyConfigPowdersNsg(ByVal myId As Long, ByVal configId As Long)
- Try
- Dim sql As String = "SELECT * from Config_List_Powder_Data_NSG where CLNID=" & configId
- Dim obj As New BSDatabase
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- sql = "INSERT INTO Config_List_Powder_Data_NSG (CLNID,PID,Load_Min,Load_Mid,Load_Max," & _
- "FPS_Min,FPS_MID,FPS_Max,CUPS_Min,CUPS_Mid,CUPS_Max,IsPref) VALUES(" & myId & _
- "," & rs("PID") & "," & rs("Load_Min") & "," & rs("Load_Mid") & "," & rs("Load_Max") & "," & _
- rs("FPS_Min") & "," & rs("FPS_MID") & "," & rs("FPS_Max") & "," & rs("CUPS_Min") & "," & _
- rs("CUPS_Mid") & "," & rs("CUPS_Max") & "," & rs("IsPref") & ")"
- obj.ConnExec(sql)
- End While
- rs.Close()
- Catch ex As Exception
- Call LogError(Name, "CopyConfigPowdersNSG", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Copies the configuration details sg.
- '''
- ''' My identifier.
- ''' The configuration identifier.
- Private Sub CopyConfigDetailsSg(ByVal myId As Long, ByVal configId As Long)
- Try
- Dim sql As String = "SELECT * from Config_List_Data_SG where CLNID=" & configId
- Dim obj As New BSDatabase
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- sql = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,Source,SW,SS,Bushing,WAD,SCL,SW_t,GID,IsPersonal) VALUES(" & _
- myId & "," & rs("ATID") & "," & rs("CALID") & "," & rs("PRID") & "," & rs("CAID") & ",'" & _
- rs("Source") & "'," & rs("SW") & "," & rs("SS") & "," & rs("Bushing") & "," & rs("WAD") & _
- "," & rs("SCL") & ",'" & rs("SW_t") & "'," & rs("GID") & "," & rs("IsPersonal") & ")"
- obj.ConnExec(sql)
- End While
- rs.Close()
- rs = Nothing
- cmd = Nothing
- Catch ex As Exception
- Call LogError(Name, "CopyConfigDetailsSG", Err.Number, ex.Message.ToString)
- End Try
- End Sub
- '''
- ''' Copies the configuration powders sg.
- '''
- ''' My identifier.
- ''' The configuration identifier.
- Private Sub CopyConfigPowdersSg(ByVal myId As Long, ByVal configId As Long)
- Try
- Dim sql As String = "SELECT * from Config_List_Powder_Data_SG where CLNID=" & configId
- Dim obj As New BSDatabase
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read
- sql = "INSERT INTO Config_List_Powder_Data_SG (CLNID,PID,Load_Min,Load_Mid,Load_Max," & _
- "FPS_Min,FPS_MID,FPS_Max,PSI_Min,PSI_Mid,PSI_Max,IsPref) VALUES(" & myId & _
- "," & rs("PID") & "," & rs("Load_Min") & "," & rs("Load_Mid") & "," & rs("Load_Max") & "," & _
- rs("FPS_Min") & "," & rs("FPS_MID") & "," & rs("FPS_Max") & "," & rs("PSI_Min") & "," & _
- rs("PSI_Mid") & "," & rs("PSI_Max") & "," & rs("IsPref") & ")"
- obj.ConnExec(sql)
- End While
- rs.Close()
- rs = Nothing
- cmd = Nothing
- Catch ex As Exception
- Call LogError(Name, "CopyConfigPowdersSG", Err.Number, ex.Message.ToString)
- End Try
- End Sub
+ '
+ 'Private Sub CopyConfigDetailsNsg(ByVal myId As Long, ByVal configId As Long)
+ ' Try
+ ' Dim sql As String = "SELECT * from Config_List_Data_NSG where CLNID=" & configId
+ ' Dim obj As New BSDatabase
+ ' Call obj.ConnectDB()
+ ' Dim cmd As New OdbcCommand(sql, obj.Conn)
+ ' Dim rs As OdbcDataReader
+ ' rs = cmd.ExecuteReader
+ ' While rs.Read
+ ' sql = "INSERT INTO Config_List_Data_NSG (CLNID,ATID,CALID,BID,PRID,CAID,Source) VALUES(" & _
+ ' myId & "," & rs("ATID") & "," & rs("CALID") & "," & rs("BID") & "," & rs("PRID") & "," & rs("CAID") & ",'" & _
+ ' rs("Source") & "')"
+ ' obj.ConnExec(sql)
+ ' End While
+ ' rs.Close()
+
+ ' Catch ex As Exception
+ ' Call LogError(Name, "CopyConfigDetailsNSG", Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
+
+ '
+ 'Private Sub CopyConfigPowdersNsg(ByVal myId As Long, ByVal configId As Long)
+ ' Try
+ ' Dim sql As String = "SELECT * from Config_List_Powder_Data_NSG where CLNID=" & configId
+ ' Dim obj As New BSDatabase
+ ' Call obj.ConnectDB()
+ ' Dim cmd As New OdbcCommand(sql, obj.Conn)
+ ' Dim rs As OdbcDataReader
+ ' rs = cmd.ExecuteReader
+ ' While rs.Read
+ ' sql = "INSERT INTO Config_List_Powder_Data_NSG (CLNID,PID,Load_Min,Load_Mid,Load_Max," & _
+ ' "FPS_Min,FPS_MID,FPS_Max,CUPS_Min,CUPS_Mid,CUPS_Max,IsPref) VALUES(" & myId & _
+ ' "," & rs("PID") & "," & rs("Load_Min") & "," & rs("Load_Mid") & "," & rs("Load_Max") & "," & _
+ ' rs("FPS_Min") & "," & rs("FPS_MID") & "," & rs("FPS_Max") & "," & rs("CUPS_Min") & "," & _
+ ' rs("CUPS_Mid") & "," & rs("CUPS_Max") & "," & rs("IsPref") & ")"
+ ' obj.ConnExec(sql)
+ ' End While
+ ' rs.Close()
+ ' Catch ex As Exception
+ ' Call LogError(Name, "CopyConfigPowdersNSG", Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
+
+ '
+ 'Private Sub CopyConfigDetailsSg(ByVal myId As Long, ByVal configId As Long)
+ ' Try
+ ' Dim sql As String = "SELECT * from Config_List_Data_SG where CLNID=" & configId
+ ' Dim obj As New BSDatabase
+ ' Call obj.ConnectDB()
+ ' Dim cmd As New OdbcCommand(sql, obj.Conn)
+ ' Dim rs As OdbcDataReader
+ ' rs = cmd.ExecuteReader
+ ' While rs.Read
+ ' sql = "INSERT INTO Config_List_Data_SG (CLNID,ATID,CALID,PRID,CAID,Source,SW,SS,Bushing,WAD,SCL,SW_t,GID,IsPersonal) VALUES(" & _
+ ' myId & "," & rs("ATID") & "," & rs("CALID") & "," & rs("PRID") & "," & rs("CAID") & ",'" & _
+ ' rs("Source") & "'," & rs("SW") & "," & rs("SS") & "," & rs("Bushing") & "," & rs("WAD") & _
+ ' "," & rs("SCL") & ",'" & rs("SW_t") & "'," & rs("GID") & "," & rs("IsPersonal") & ")"
+ ' obj.ConnExec(sql)
+ ' End While
+ ' rs.Close()
+ ' rs = Nothing
+ ' cmd = Nothing
+ ' Catch ex As Exception
+ ' Call LogError(Name, "CopyConfigDetailsSG", Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
+
+ '
+ 'Private Sub CopyConfigPowdersSg(ByVal myId As Long, ByVal configId As Long)
+ ' Try
+ ' Dim sql As String = "SELECT * from Config_List_Powder_Data_SG where CLNID=" & configId
+ ' Dim obj As New BSDatabase
+ ' Call obj.ConnectDB()
+ ' Dim cmd As New OdbcCommand(sql, obj.Conn)
+ ' Dim rs As OdbcDataReader
+ ' rs = cmd.ExecuteReader
+ ' While rs.Read
+ ' sql = "INSERT INTO Config_List_Powder_Data_SG (CLNID,PID,Load_Min,Load_Mid,Load_Max," & _
+ ' "FPS_Min,FPS_MID,FPS_Max,PSI_Min,PSI_Mid,PSI_Max,IsPref) VALUES(" & myId & _
+ ' "," & rs("PID") & "," & rs("Load_Min") & "," & rs("Load_Mid") & "," & rs("Load_Max") & "," & _
+ ' rs("FPS_Min") & "," & rs("FPS_MID") & "," & rs("FPS_Max") & "," & rs("PSI_Min") & "," & _
+ ' rs("PSI_Mid") & "," & rs("PSI_Max") & "," & rs("IsPref") & ")"
+ ' obj.ConnExec(sql)
+ ' End While
+ ' rs.Close()
+ ' rs = Nothing
+ ' cmd = Nothing
+ ' Catch ex As Exception
+ ' Call LogError(Name, "CopyConfigPowdersSG", Err.Number, ex.Message.ToString)
+ ' End Try
+ 'End Sub
#End Region
#Region "Tool Bar And Misc. Components Subs"
'''
@@ -547,20 +611,22 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub btnAddConfig_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddConfig.Click
- frmConfig_Add_Wizard.MdiParent = Me
- frmConfig_Add_Wizard.Show()
+ FrmConfigAddWizard.MdiParent = Me
+ FrmConfigAddWizard.Show()
End Sub
'''
''' Views the configs.
'''
Sub ViewConfigs()
- Dim objGs As New GlobalFunctions
+ 'Dim objGs As New GlobalFunctions
Dim lngConfigId As Long = lstConfigSheets.SelectedValue
- Dim configType As Boolean = objGs.IsShotGunCOnfig(lngConfigId)
+ 'Dim configType As Boolean = objGs.IsShotGunCOnfig(lngConfigId)
+ Dim configType As Boolean = ConfigListGeneral.IsShotgunConfig(DatabasePath, lngConfigId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
If Not configType Then
- Dim frmNew As New frmView_Configuration_Sheet
- frmNew.ConfigID = lngConfigId
+ Dim frmNew As New FrmViewConfigurationSheet
+ frmNew.ConfigId = lngConfigId
frmNew.MdiParent = Me
frmNew.Show()
Else
@@ -587,8 +653,8 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub ToolStripButton3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ToolStripButton3.Click
Cursor = Cursors.WaitCursor
- frmView_List_Firearms.MdiParent = Me
- frmView_List_Firearms.Show()
+ FrmViewListFirearms.MdiParent = Me
+ FrmViewListFirearms.Show()
Cursor = Cursors.Arrow
End Sub
'''
@@ -597,20 +663,26 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub lstCal_DoubleClick(ByVal sender As Object, ByVal e As EventArgs) Handles lstCal.DoubleClick
- Dim objGf As New GlobalFunctions
- Dim lngCalId As Long = lstCal.SelectedValue
- Dim isNsg As Boolean = objGf.IsNotInShotgunConfigbyCal(lngCalId)
- If isNsg Then
- Dim frmNew As New frmView_List_ConfigurationsByCal
- frmNew.CALID = lngCalId
- frmNew.MdiParent = Me
- frmNew.Show()
- Else
- Dim frmNewS As New frmView_List_ConfigurationsByCal_SG
- frmNewS.CALID = lngCalId
- frmNewS.MdiParent = Me
- frmNewS.Show()
- End If
+ Try
+ 'Dim objGf As New GlobalFunctions
+ Dim lngCalId As Long = lstCal.SelectedValue
+ 'Dim isNsg As Boolean = objGf.IsNotInShotgunConfigbyCal(lngCalId)
+ Dim isNsg As Boolean = ConfigListGeneral.IsNotInShotgunConfigByCaliber(DatabasePath, lngCalId, _errOut)
+ If _errOut.Length > 0 Then Throw new Exception(_errOut)
+ If isNsg Then
+ Dim frmNew As New FrmViewListConfigurationsByCal
+ frmNew.CaliberId = lngCalId
+ frmNew.MdiParent = Me
+ frmNew.Show()
+ Else
+ Dim frmNewS As New FrmViewListConfigurationsByCalSg
+ frmNewS.CaliberId = lngCalId
+ frmNewS.MdiParent = Me
+ frmNewS.Show()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "lstCal_DoubleClick", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the btnDelete control.
@@ -619,19 +691,22 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub btnDelete_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDelete.Click
Dim lngConfigId As Long = lstConfigSheets.SelectedValue
- Dim obj As New BSDatabase
- Dim objG As New GlobalFunctions
- Dim strName As String = objG.GetName("SELECT * from Config_List_Name where ID=" & lngConfigId, "ConfigName")
+ 'Dim obj As New BSDatabase
+ 'Dim objG As New GlobalFunctions
+ 'Dim strName As String = objG.GetName("SELECT * from Config_List_Name where ID=" & lngConfigId, "ConfigName")
+ Dim strName As String = ConfigListDataName.GetName(DatabasePath, lngConfigId ,_errOut)
+ If _errOut.Length > 0 then Throw New Exception(_errOut)
Dim strAns As String = MsgBox("Are you sure you want to delete " & strName & "?", MsgBoxStyle.YesNo, "Delete Item from the Database.")
- Dim sql As String = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & lngConfigId
+ 'Dim sql As String = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & lngConfigId
If strAns = vbYes Then
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Data_NSG where CLNID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Name where ID=" & lngConfigId
- obj.ConnExec(sql)
+ if Not ConfigListDataName.Delete(DatabasePath, lngConfigId ,_errOut) then Throw New Exception(_errOut)
+ 'obj.ConnExec(sql)
+ 'sql = "DELETE from Config_List_Data_NSG where CLNID=" & lngConfigId
+ 'obj.ConnExec(sql)
+ 'sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & lngConfigId
+ 'obj.ConnExec(sql)
+ 'sql = "DELETE from Config_List_Name where ID=" & lngConfigId
+ 'obj.ConnExec(sql)
Call RefreshConfigData()
End If
End Sub
@@ -641,10 +716,14 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub tsslErrorsFound_Click(ByVal sender As Object, ByVal e As EventArgs) Handles tsslErrorsFound.Click
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MyLogFile
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
- myProcess.Start()
+ Try
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = MyLogFile
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "tsslErrorsFound_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the tsslMGCEnabled control.
@@ -652,12 +731,18 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub tsslMGCEnabled_Click(ByVal sender As Object, ByVal e As EventArgs) Handles tsslMGCEnabled.Click
- Dim obj As New BSMGC
- Dim strPath As String = obj.GetMGCEXEPath
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = strPath
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
- myProcess.Start()
+ Try
+ 'Dim obj As New BSMGC
+ 'Dim strPath As String = obj.GetMGCEXEPath
+ Dim strPath As String = RegistryHelpers.GetMgcExePath(_errOut)
+ if _errOut.Length > 0 then Throw new Exception(_errOut)
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = strPath
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "tsslMGCEnabled_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ToolStripButton4 control.
@@ -665,10 +750,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ToolStripButton4_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ToolStripButton4.Click
- Cursor = Cursors.WaitCursor
- frmView_Loaded_Ammunition.MdiParent = Me
- frmView_Loaded_Ammunition.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewLoadedAmmunition.MdiParent = Me
+ FrmViewLoadedAmmunition.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "tsslMGCEnabled_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the btnImportConfig control.
@@ -676,8 +766,12 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub btnImportConfig_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnImportConfig.Click
- frmImportConfiguration.MdiParent = Me
- frmImportConfiguration.Show()
+ Try
+ frmImportConfiguration.MdiParent = Me
+ frmImportConfiguration.Show()
+ Catch ex As Exception
+ Call LogError(Name, "btnImportConfig_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ToolStripButton5 control.
@@ -685,10 +779,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ToolStripButton5_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ToolStripButton5.Click
- Cursor = Cursors.WaitCursor
- frmSearchConfig_RiflePistol.MdiParent = Me
- frmSearchConfig_RiflePistol.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmSearchConfig_RiflePistol.MdiParent = Me
+ frmSearchConfig_RiflePistol.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "ToolStripButton5_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the SelectedIndexChanged event of the cmbConfigSort control.
@@ -791,8 +890,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub OptionsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles OptionsToolStripMenuItem.Click
- FrmOptions.MdiParent = Me
- FrmOptions.Show()
+ Try
+ FrmOptions.MdiParent = Me
+ FrmOptions.Show()
+ Catch ex As Exception
+ Call LogError(Name, "TechnicalSupportToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the SaveToolStripMenuItem control.
@@ -802,27 +906,32 @@ Public Class MdiParentMain
Private Sub SaveToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SaveToolStripMenuItem.Click
Call DoBackup()
End Sub
- '''
- ''' Handles the Click event of the PurchaseToolStripMenuItem control.
- '''
- ''' The source of the event.
- ''' The instance containing the event data.
- Private Sub PurchaseToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MenuShop
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
- myProcess.Start()
- End Sub
+ ''''
+ '''' Handles the Click event of the PurchaseToolStripMenuItem control.
+ ''''
+ '''' The source of the event.
+ '''' The instance containing the event data.
+ 'Private Sub PurchaseToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
+ ' Dim myProcess As New Process
+ ' myProcess.StartInfo.FileName = MenuShop
+ ' myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
+ ' myProcess.Start()
+ 'End Sub
'''
''' Handles the Click event of the TechnicalSupportToolStripMenuItem control.
'''
''' The source of the event.
''' The instance containing the event data.
Private Sub TechnicalSupportToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles TechnicalSupportToolStripMenuItem.Click
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MenuSupport
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
- myProcess.Start()
+ Try
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = GeneralSettings.MENU_SUPPORT
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "TechnicalSupportToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ReportABugToolStripMenuItem control.
@@ -830,10 +939,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ReportABugToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ReportABugToolStripMenuItem.Click
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MenuBug
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
- myProcess.Start()
+ Try
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = GeneralSettings.MENU_BUG
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "ReportABugToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the KnowledgeBaseToolStripMenuItem control.
@@ -841,10 +955,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub KnowledgeBaseToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles KnowledgeBaseToolStripMenuItem.Click
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MenuWiki
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
- myProcess.Start()
+ Try
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = GeneralSettings.MENU_WIKI
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "KnowledgeBaseToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the SearchToolStripMenuItem control.
@@ -852,10 +971,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub SearchToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SearchToolStripMenuItem.Click
- Dim myProcess As New Process
- myProcess.StartInfo.FileName = MenuSitesearch
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
- myProcess.Start()
+ Try
+ Dim myProcess As New Process
+ myProcess.StartInfo.FileName = GeneralSettings.MENU_SITESEARCH
+ myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
+ myProcess.Start()
+ Catch ex As Exception
+ Call LogError(Name, "SearchToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the IndexToolStripMenuItem control.
@@ -863,7 +987,12 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub IndexToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles IndexToolStripMenuItem.Click
- Help.ShowHelpIndex(Me, MyHelpFile)
+ Try
+ Help.ShowHelpIndex(Me, GeneralSettings.MY_HELP_FILE)
+ Catch ex As Exception
+ Call LogError(Name, "IndexToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ContentsToolStripMenuItem control.
@@ -879,8 +1008,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PowderToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PowderToolStripMenuItem.Click
- frmAddPowder.MdiParent = Me
- frmAddPowder.Show()
+ Try
+ frmAddPowder.MdiParent = Me
+ frmAddPowder.Show()
+ Catch ex As Exception
+ Call LogError(Name, "PowderToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PrimerToolStripMenuItem control.
@@ -888,8 +1022,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PrimerToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrimerToolStripMenuItem.Click
- frmAddPrimer.MdiParent = Me
- frmAddPrimer.Show()
+ Try
+ frmAddPrimer.MdiParent = Me
+ frmAddPrimer.Show()
+ Catch ex As Exception
+ Call LogError(Name, "PrimerToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the BulletToolStripMenuItem control.
@@ -897,8 +1036,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub BulletToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BulletToolStripMenuItem.Click
- FrmAddBullets.MdiParent = Me
- FrmAddBullets.Show()
+ Try
+ FrmAddBullets.MdiParent = Me
+ FrmAddBullets.Show()
+ Catch ex As Exception
+ Call LogError(Name, "BulletToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the CaseToolStripMenuItem control.
@@ -906,8 +1050,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub CaseToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CaseToolStripMenuItem.Click
- frmAddShells.MdiParent = Me
- frmAddShells.Show()
+ Try
+ frmAddShells.MdiParent = Me
+ frmAddShells.Show()
+ Catch ex As Exception
+ Call LogError(Name, "CaseToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the MyFirearmCollectionsToolStripMenuItem control.
@@ -915,10 +1064,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub MyFirearmCollectionsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles MyFirearmCollectionsToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmView_List_Firearms.MdiParent = Me
- frmView_List_Firearms.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListFirearms.MdiParent = Me
+ FrmViewListFirearms.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Call LogError(Name, "MyFirearmCollectionsToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the EquipmentToolStripMenuItem control.
@@ -926,8 +1080,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub EquipmentToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles EquipmentToolStripMenuItem.Click
- frmAddEquipment.MdiParent = Me
- frmAddEquipment.Show()
+ Try
+ frmAddEquipment.MdiParent = Me
+ frmAddEquipment.Show()
+ Catch ex As Exception
+ Call LogError(Name, "EquipmentToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the AddFirearmToolStripMenuItem control.
@@ -935,8 +1094,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub AddFirearmToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AddFirearmToolStripMenuItem.Click
- frmAddFirearm.MdiParent = Me
- frmAddFirearm.Show()
+ Try
+ frmAddFirearm.MdiParent = Me
+ frmAddFirearm.Show()
+ Catch ex As Exception
+ Call LogError(Name, "AddFirearmToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the EquipmentToolStripMenuItem1 control.
@@ -944,10 +1108,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub EquipmentToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles EquipmentToolStripMenuItem1.Click
- Cursor = Cursors.WaitCursor
- frmView_List_Equipment.MdiParent = Me
- frmView_List_Equipment.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListEquipment.MdiParent = Me
+ FrmViewListEquipment.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "EquipmentToolStripMenuItem1_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the CaseToolStripMenuItem1 control.
@@ -955,10 +1125,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub CaseToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CaseToolStripMenuItem1.Click
- Cursor = Cursors.WaitCursor
- FrmViewListShells.MdiParent = Me
- FrmViewListShells.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListShells.MdiParent = Me
+ FrmViewListShells.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "CaseToolStripMenuItem1_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PrimerListToolStripMenuItem control.
@@ -966,10 +1142,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PrimerListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrimerListToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmView_List_Primer.MdiParent = Me
- frmView_List_Primer.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListPrimer.MdiParent = Me
+ FrmViewListPrimer.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "PrimerListToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PowderListToolStripMenuItem control.
@@ -977,10 +1159,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PowderListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PowderListToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmView_List_Powder.MdiParent = Me
- frmView_List_Powder.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListPowder.MdiParent = Me
+ FrmViewListPowder.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "PowderListToolStripMenuItem_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the BulletToolStripMenuItem1 control.
@@ -988,10 +1176,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub BulletToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BulletToolStripMenuItem1.Click
- Cursor = Cursors.WaitCursor
- frmView_List_Bullets.MdiParent = Me
- frmView_List_Bullets.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewListBullets.MdiParent = Me
+ FrmViewListBullets.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "BulletToolStripMenuItem1_Click", Err.Number,
+ ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the MakeReadyToUseAmmunitionToolStripMenuItem control.
@@ -999,15 +1193,21 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub MakeReadyToUseAmmunitionToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles MakeReadyToUseAmmunitionToolStripMenuItem.Click
- Dim configId As Long = lstConfigSheets.SelectedValue
- Dim configName As String
- Dim frmNew As New frmLoadMakeReady_Details
- Dim objG As New GlobalFunctions
- configName = objG.GetTitle(configId)
- frmNew.ConfigID = configId
- frmNew.ConfigName = configName
- frmNew.MdiParent = Me
- frmNew.Show()
+ Try
+ Dim configId As Long = lstConfigSheets.SelectedValue
+ Dim configName As String = GeneralFunctions.GetTitle(DatabasePath, configId, _errOut)
+ if _errOut.Length > 0 Then Throw new Exception(_errOut)
+ 'Dim objG As New GlobalFunctions
+ 'configName = objG.GetTitle(configId)
+ Dim frmNew As New FrmLoadMakeReadyDetails With {
+ .ConfigId = configId,
+ .ConfigName = configName,
+ .MdiParent = Me
+ }
+ frmNew.Show()
+ Catch ex As Exception
+ Call LogError(Name, "MakeReadyToUseAmmunitionToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the DeleteToolStripMenuItem control.
@@ -1015,31 +1215,41 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub DeleteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles DeleteToolStripMenuItem.Click
- Dim lngConfigId As Long = lstConfigSheets.SelectedValue
- Dim obj As New BSDatabase
- Dim objG As New GlobalFunctions
- Dim strName As String = objG.GetName("SELECT * from Config_List_Name where ID=" & lngConfigId, "ConfigName")
- Dim strAns As String = MsgBox("Are you sure you want to delete " & strName & "?", MsgBoxStyle.YesNo, "Delete Item from the Database.")
- Dim isShotGun As Boolean = objG.IsShotGunCOnfig(lngConfigId)
- Dim sql As String = ""
- If strAns = vbYes Then
- If Not isShotGun Then
- sql = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Data_NSG where CLNID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Name where ID=" & lngConfigId
- obj.ConnExec(sql)
- Else
- sql = "DELETE from Config_List_Powder_Data_SG where CLNID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Data_SG where CLNID=" & lngConfigId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Name where ID=" & lngConfigId
- obj.ConnExec(sql)
+ Try
+ Dim lngConfigId As Long = lstConfigSheets.SelectedValue
+ 'Dim obj As New BSDatabase
+ 'Dim objG As New GlobalFunctions
+ 'Dim strName As String = objG.GetName("SELECT * from Config_List_Name where ID=" & lngConfigId, "ConfigName")
+ Dim sql As String = $"SELECT * from Config_List_Name where ID={lngConfigId}"
+ Dim strName As String = BurnSoft.Applications.MLL.Database.GetName(DatabasePath, sql, "ConfigName", _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim strAns As String = MsgBox("Are you sure you want to delete " & strName & "?", MsgBoxStyle.YesNo, "Delete Item from the Database.")
+ 'Dim isShotGun As Boolean = objG.IsShotGunCOnfig(lngConfigId)
+ 'Dim isShotGun As Boolean = ConfigListGeneral.IsShotGunCOnfig(DatabasePath, lngConfigId, errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ 'Dim sql As String = ""
+ If strAns = vbYes Then
+ If Not ConfigListDataName.Delete(DatabasePath, lngConfigId, _errOut) Then Throw new Exception(_errOut)
+ 'If Not isShotGun Then
+ ' sql = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Data_NSG where CLNID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Name where ID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ 'Else
+ ' sql = "DELETE from Config_List_Powder_Data_SG where CLNID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Data_SG where CLNID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Name where ID=" & lngConfigId
+ ' obj.ConnExec(sql)
+ 'End If
+ Call RefreshConfigData()
End If
- Call RefreshConfigData()
- End If
+ Catch ex As Exception
+ Call LogError(Name, "DeleteToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ToolStripMenuItem1 control.
@@ -1047,18 +1257,23 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ToolStripMenuItem1.Click
- Dim configId As Long = lstConfigSheets.SelectedValue
- Dim configName As String
- Dim objG As New GlobalFunctions
- configName = objG.GetTitle(configId)
- Dim sMsg As String = "Renaming " & configName & " to:"
- Dim strNewName As String = Trim(GeneralHelpers.FluffContent(InputBox(sMsg, "Rename Configuration Name", configName)))
- If Len(strNewName) <> 0 And LCase(strNewName) <> LCase(configName) Then
- Dim sql As String = "UPDATE Config_List_Name set ConfigName='" & strNewName & "' where id=" & configId
- Dim obj As New BSDatabase
- obj.ConnExec(sql)
- Call RefreshConfigData()
- End If
+ try
+ Dim configId As Long = lstConfigSheets.SelectedValue
+ Dim configName As String = GeneralFunctions.GetTitle(DatabasePath, configId, _errOut)
+ 'Dim objG As New GlobalFunctions
+ 'configName = objG.GetTitle(configId)
+ Dim sMsg As String = "Renaming " & configName & " to:"
+ Dim strNewName As String = Trim(GeneralHelpers.FluffContent(InputBox(sMsg, "Rename Configuration Name", configName)))
+ If Len(strNewName) <> 0 And LCase(strNewName) <> LCase(configName) Then
+ if Not ConfigListDataName.Rename(DatabasePath, configId, strNewName, _errOut) Then Throw new Exception(_errOut)
+ 'Dim sql As String = "UPDATE Config_List_Name set ConfigName='" & strNewName & "' where id=" & configId
+ 'Dim obj As New BSDatabase
+ 'obj.ConnExec(sql)
+ Call RefreshConfigData()
+ End If
+ Catch ex As Exception
+ Call LogError(Name, "ToolStripMenuItem1_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the ViewToolStripMenuItem control.
@@ -1066,9 +1281,14 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ViewToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ViewToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- Call ViewConfigs()
- Cursor = Cursors.Arrow
+ try
+ Cursor = Cursors.WaitCursor
+ Call ViewConfigs()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "ViewToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the CopyToolStripMenuItem control.
@@ -1076,42 +1296,50 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CopyToolStripMenuItem.Click
- Dim configId As Long = lstConfigSheets.SelectedValue
- Dim configName As String
- Dim objG As New GlobalFunctions
- configName = objG.GetTitle(configId)
- Dim isShotGun As Boolean = False
+ Try
+ Dim configId As Long = lstConfigSheets.SelectedValue
+ Dim configName As String = GeneralFunctions.GetTitle(DatabasePath, configId, _errOut)
+ 'Dim objG As New GlobalFunctions
+ 'configName = objG.GetTitle(configId)
+ 'Dim isShotGun As Boolean = False
Dim sMsg As String = "What do you wish to call this new configuration?"
Dim strNewName As String = Trim(GeneralHelpers.FluffContent(InputBox(sMsg, "Copy Configuration", configName)))
If Len(strNewName) <> 0 And LCase(strNewName) <> LCase(configName) Then
- Dim sql As String = "SELECT * from Config_List_Name where ID=" & configId
- Dim obj As New BSDatabase
- Call obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- While rs.Read()
- If rs("IsShotGun") = 1 Then isShotGun = True
- Dim strNotes As String = " "
- If Not IsDBNull(rs("notes")) Then strNotes = GeneralHelpers.FluffContent(rs("Notes"))
- sql = "INSERT INTO Config_List_Name(ConfigName,IsPersonal,IsShotGun,Notes,IsActive,IsFav) VALUES('" & _
- strNewName & "'," & rs("IsPersonal") & "," & rs("IsShotGun") & ",'" & _
- strNotes & "'," & rs("IsActive") & "," & rs("IsFav") & ")"
- obj.ConnExec(sql)
- End While
- rs.Close()
- rs = Nothing
- cmd = Nothing
- Dim myId As Long = objG.GetID("SELECT * from Config_list_Name where ConfigName='" & strNewName & "'")
- If Not isShotGun Then
- Call CopyConfigDetailsNsg(myId, configId)
- Call CopyConfigPowdersNsg(myId, configId)
- Else
- Call CopyConfigDetailsSg(myId, configId)
- Call CopyConfigPowdersSg(myId, configId)
- End If
+ if Not ConfigListDataName.CopyConfig(DatabasePath, strNewName, configId, _errOut) Then Throw new Exception(_errOut)
+
+ 'Dim sql As String = "SELECT * from Config_List_Name where ID=" & configId
+ 'Dim obj As New BSDatabase
+ 'Call obj.ConnectDB()
+ 'Dim cmd As New OdbcCommand(sql, obj.Conn)
+ 'Dim rs As OdbcDataReader
+ 'rs = cmd.ExecuteReader
+ 'While rs.Read()
+ ' If rs("IsShotGun") = 1 Then isShotGun = True
+ ' Dim strNotes As String = " "
+ ' If Not IsDBNull(rs("notes")) Then strNotes = GeneralHelpers.FluffContent(rs("Notes"))
+ ' sql = "INSERT INTO Config_List_Name(ConfigName,IsPersonal,IsShotGun,Notes,IsActive,IsFav) VALUES('" & _
+ ' strNewName & "'," & rs("IsPersonal") & "," & rs("IsShotGun") & ",'" & _
+ ' strNotes & "'," & rs("IsActive") & "," & rs("IsFav") & ")"
+ ' obj.ConnExec(sql)
+ 'End While
+ 'rs.Close()
+ 'rs = Nothing
+ 'cmd = Nothing
+ ''Dim myId As Long = objG.GetID("SELECT * from Config_list_Name where ConfigName='" & strNewName & "'")
+ 'Dim myId As Long = ConfigListDataName.GetId(DatabasePath, strNewName, errOut)
+ 'if errOut.Length > 0 then Throw New Exception(errOut)
+ 'If Not isShotGun Then
+ ' Call CopyConfigDetailsNsg(myId, configId)
+ ' Call CopyConfigPowdersNsg(myId, configId)
+ 'Else
+ ' Call CopyConfigDetailsSg(myId, configId)
+ ' Call CopyConfigPowdersSg(myId, configId)
+ 'End If
Call RefreshConfigData()
End If
+ Catch ex As Exception
+ Call LogError(Name, "CopyToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the EditToolStripMenuItem control.
@@ -1119,15 +1347,20 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub EditToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles EditToolStripMenuItem.Click
- Dim frmNew As New frmEditConfig
- Dim configId As Long = lstConfigSheets.SelectedValue
- Dim configName As String
- Dim objG As New GlobalFunctions
- configName = objG.GetTitle(configId)
- frmNew.ConfigID = configId
- frmNew.ConfigName = configName
- frmNew.MdiParent = Me
- frmNew.Show()
+ Try
+ Dim frmNew As New frmEditConfig
+ Dim configId As Long = lstConfigSheets.SelectedValue
+ Dim configName As String
+ 'Dim objG As New GlobalFunctions
+ 'configName = objG.GetTitle(configId)
+ configName = GeneralFunctions.GetTitle(DatabasePath, configId, _errOut)
+ frmNew.ConfigID = configId
+ frmNew.ConfigName = configName
+ frmNew.MdiParent = Me
+ frmNew.Show()
+ Catch ex As Exception
+ Call LogError(Name, "EditToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the UseConfigurationToolStripMenuItem control.
@@ -1135,9 +1368,13 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub UseConfigurationToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles UseConfigurationToolStripMenuItem.Click
- Dim frmNew As New FrmAddDataSheetRiflePistolsCfg
- frmNew.MdiParent = Me
- frmNew.Show()
+ Try
+ Dim frmNew As New FrmAddDataSheetRiflePistolsCfg
+ frmNew.MdiParent = Me
+ frmNew.Show()
+ Catch ex As Exception
+ Call LogError(Name, "UseConfigurationToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the RiflePistolToolStripMenuItem1 control.
@@ -1145,11 +1382,16 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub RiflePistolToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles RiflePistolToolStripMenuItem1.Click
- Cursor = Cursors.WaitCursor
- Dim frmnew As New frmViewDataSheet_RiflePistols
- frmnew.MdiParent = Me
- frmnew.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ Dim frmnew As New FrmViewDataSheetRiflePistols
+ frmnew.MdiParent = Me
+ frmnew.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "RiflePistolToolStripMenuItem1_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the AmmunitionInventoryToolStripMenuItem control.
@@ -1157,10 +1399,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub AmmunitionInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AmmunitionInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_Loaded_Ammunition.MdiParent = Me
- frmReport_Loaded_Ammunition.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmReport_Loaded_Ammunition.MdiParent = Me
+ frmReport_Loaded_Ammunition.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "AmmunitionInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the EquipmentListToolStripMenuItem control.
@@ -1168,10 +1415,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub EquipmentListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles EquipmentListToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_List_Equipment.MdiParent = Me
- frmReport_List_Equipment.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmReport_List_Equipment.MdiParent = Me
+ frmReport_List_Equipment.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "EquipmentListToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the FirearmInventoryToolStripMenuItem control.
@@ -1179,10 +1431,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub FirearmInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles FirearmInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_List_Firearms.MdiParent = Me
- frmReport_List_Firearms.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmReport_List_Firearms.MdiParent = Me
+ frmReport_List_Firearms.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "FirearmInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PowderInventoryToolStripMenuItem control.
@@ -1190,10 +1447,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PowderInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PowderInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_PowderInventory.MdiParent = Me
- frmReport_PowderInventory.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmReport_PowderInventory.MdiParent = Me
+ frmReport_PowderInventory.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "PowderInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PrimerInventoryToolStripMenuItem control.
@@ -1201,10 +1463,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PrimerInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrimerInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_PrimerInventory.MdiParent = Me
- frmReport_PrimerInventory.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ frmReport_PrimerInventory.MdiParent = Me
+ frmReport_PrimerInventory.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "PrimerInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the BulletInventoryToolStripMenuItem control.
@@ -1212,10 +1479,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub BulletInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BulletInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_BulletInventory.MdiParent = Me
- frmReport_BulletInventory.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmReportBulletInventory.MdiParent = Me
+ FrmReportBulletInventory.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "BulletInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the CaseBrassInventoryToolStripMenuItem control.
@@ -1223,10 +1495,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub CaseBrassInventoryToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CaseBrassInventoryToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmReport_CaseInventory.MdiParent = Me
- frmReport_CaseInventory.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmReportCaseInventory.MdiParent = Me
+ FrmReportCaseInventory.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "CaseBrassInventoryToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the CaliberReloadToolStripMenuItem control.
@@ -1234,8 +1511,12 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub CaliberReloadToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CaliberReloadToolStripMenuItem.Click
- FrmAddCaliberToCollection.MdiParent = Me
- FrmAddCaliberToCollection.Show()
+ Try
+ FrmAddCaliberToCollection.MdiParent = Me
+ FrmAddCaliberToCollection.Show()
+ Catch ex As Exception
+ Call LogError(Name, "CaliberReloadToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PreLoadedCaliberListToolStripMenuItem control.
@@ -1243,10 +1524,15 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PreLoadedCaliberListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PreLoadedCaliberListToolStripMenuItem.Click
- Cursor = Cursors.WaitCursor
- frmView_General_Calibers.MdiParent = Me
- frmView_General_Calibers.Show()
- Cursor = Cursors.Arrow
+ Try
+ Cursor = Cursors.WaitCursor
+ FrmViewGeneralCalibers.MdiParent = Me
+ FrmViewGeneralCalibers.Show()
+ Cursor = Cursors.Arrow
+ Catch ex As Exception
+ Cursor = Cursors.Arrow
+ Call LogError(Name, "PreLoadedCaliberListToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the PrimerTypeToolStripMenuItem control.
@@ -1254,8 +1540,12 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub PrimerTypeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrimerTypeToolStripMenuItem.Click
- frmEdit_PrimerTypes.MdiParent = Me
- frmEdit_PrimerTypes.Show()
+ Try
+ frmEdit_PrimerTypes.MdiParent = Me
+ frmEdit_PrimerTypes.Show()
+ Catch ex As Exception
+ Call LogError(Name, "PrimerTypeToolStripMenuItem_Click", Err.Number, ex.Message.ToString)
+ End Try
End Sub
'''
''' Handles the Click event of the AmmunitionTypesToolStripMenuItem control.
@@ -1291,7 +1581,7 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub ShotgunToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ShotgunToolStripMenuItem1.Click
Cursor = Cursors.WaitCursor
- Dim frmNew As New frmViewDataSheet_Shotgun
+ Dim frmNew As New FrmViewDataSheetShotgun
frmNew.MdiParent = Me
frmNew.Show()
Cursor = Cursors.Arrow
@@ -1341,8 +1631,8 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub ShellListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ShellListToolStripMenuItem.Click
Cursor = Cursors.WaitCursor
- frmView_List_ShellHulls.MdiParent = Me
- frmView_List_ShellHulls.Show()
+ FrmViewListShellHulls.MdiParent = Me
+ FrmViewListShellHulls.Show()
Cursor = Cursors.Arrow
End Sub
'''
@@ -1352,8 +1642,8 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub WADListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles WADListToolStripMenuItem.Click
Cursor = Cursors.WaitCursor
- frmView_List_WADS.MdiParent = Me
- frmView_List_WADS.Show()
+ FrmViewListWads.MdiParent = Me
+ FrmViewListWads.Show()
Cursor = Cursors.Arrow
End Sub
'''
@@ -1395,60 +1685,87 @@ Public Class MdiParentMain
Private Sub DeleteCaliberToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles DeleteCaliberToolStripMenuItem.Click
Try
Dim lngCalId As Long = lstCal.SelectedValue
- Dim obj As New BSDatabase
- Dim objG As New GlobalFunctions
- Dim strSqlTable As String = "List_Calibers"
- Dim strName As String = objG.GetName("SELECT * from " & strSqlTable & " where ID=" & lngCalId, "Cal")
- Dim cOnfigCount As Long = objG.TotalConfigByCal(lngCalId)
- Dim strAns As String = ""
- Dim sql As String = ""
+ 'Dim obj As New BSDatabase
+ 'Dim objG As New GlobalFunctions
+ 'Dim strSqlTable As String = "List_Calibers"
+ 'Dim strName As String = objG.GetName("SELECT * from " & strSqlTable & " where ID=" & lngCalId, "Cal")
+ 'Dim cOnfigCount As Long = objG.TotalConfigByCal(lngCalId)
+ Dim cOnfigCount As Long = CaliberInventory.TotalConfigurationUsedByCaliber(DatabasePath, lngCalId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Dim strName As String = CaliberInventory.GetName(DatabasePath, lngCalId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ 'Dim cOnfigCount As Long =
+ Dim strAns As String
+ 'Dim sql As String = ""
If cOnfigCount = 0 Then
- strAns = MsgBox("Are you sure you want to delete " & strName & "?", MsgBoxStyle.YesNo, "Delete Item from the Database.")
+ strAns = MsgBox("Are you sure you want to delete " & strName & "?",
+ MsgBoxStyle.YesNo, "Delete Item from the Database.")
Else
- strAns = MsgBox("Are you sure you want to delete " & strName & " and the " & cOnfigCount & " configurations with it?", MsgBoxStyle.YesNo, "Delete Item from the Database.")
+ strAns = MsgBox("Are you sure you want to delete " & strName & " and the " &
+ cOnfigCount & " configurations with it?", MsgBoxStyle.YesNo,
+ "Delete Item from the Database.")
End If
If strAns = vbYes Then
+ Cursor = Cursors.WaitCursor
If cOnfigCount = 0 Then
- Cursor = Cursors.WaitCursor
- sql = "DELETE from " & strSqlTable & " where ID=" & lngCalId
- obj.ConnExec(sql)
- Cursor = Cursors.Arrow
+ 'Cursor = Cursors.WaitCursor
+ 'sql = "DELETE from " & strSqlTable & " where ID=" & lngCalId
+ 'obj.ConnExec(sql)
+ if not CaliberInventory.Delete(DatabasePath, lngCalId, _errOut) then throw new Exception(_errOut)
+ 'Cursor = Cursors.Arrow
Else
- sql = "Select ID,IsShotGun from qry_ConfigCal_NSG where CalID=" & lngCalId
- If objG.IsShotGunCOnfig(lngCalId) Then sql = "Select ID,IsShotGun from qry_ConfigCal_SG where CalID=" & lngCalId
- obj.ConnectDB()
- Dim cmd As New OdbcCommand(sql, obj.Conn)
- Dim rs As OdbcDataReader
- rs = cmd.ExecuteReader
- Dim configId As Long = 0
- Cursor = Cursors.WaitCursor
- While rs.Read
- configId = rs("CLNID")
- If rs("IsShotGun") = 0 Then
- sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Data_NSG where CLNID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Name where ID=" & configId
- obj.ConnExec(sql)
- Else
- sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Powder_Data_SG where CLNID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Data_SG where CLNID=" & configId
- obj.ConnExec(sql)
- sql = "DELETE from Config_List_Name where ID=" & configId
- obj.ConnExec(sql)
- End If
- End While
- rs.Close()
- rs = Nothing
- cmd = Nothing
- sql = "DELETE from " & strSqlTable & " where ID=" & lngCalId
- obj.ConnExec(sql)
+ Dim lst as List(Of QueryConfigCaliberData)
+ Dim isShotgunConfig as Boolean = ConfigListGeneral.IsShotgunConfig(DatabasePath, lngCalId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ if isShotgunConfig Then
+ lst = QueryConfigCaliberShotgun.GetDetailsByCaliberId(DatabasePath, lngCalId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ Else
+ lst = QueryConfigCaliberMetallic.GetDetailsByCaliberId(DatabasePath, lngCalId, _errOut)
+ if _errOut.Length > 0 Then Throw New Exception(_errOut)
+ End If
+
+ For Each o As QueryConfigCaliberData In lst
+ If Not ConfigListDataName.Delete(DatabasePath, o.Id, _errOut ) Then Throw New Exception(_errOut)
+ Next
+
+
+ 'sql = "Select ID,IsShotGun from qry_ConfigCal_NSG where CalID=" & lngCalId
+ 'If ConfigListGeneral.IsShotgunConfig(DatabasePath, lngCalId, errOut) Then sql = "Select ID,IsShotGun from qry_ConfigCal_SG where CalID=" & lngCalId
+ 'obj.ConnectDB()
+ 'Dim cmd As New OdbcCommand(sql, obj.Conn)
+ 'Dim rs As OdbcDataReader
+ 'rs = cmd.ExecuteReader
+ 'Dim configId As Long = 0
+ 'Cursor = Cursors.WaitCursor
+ 'While rs.Read
+ ' configId = rs("CLNID")
+ ' If rs("IsShotGun") = 0 Then
+ ' sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Powder_Data_NSG where CLNID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Data_NSG where CLNID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Name where ID=" & configId
+ ' obj.ConnExec(sql)
+ ' Else
+ ' sql = "DELETE from Loaders_Log_Ammunition_Audit where CFID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Powder_Data_SG where CLNID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Data_SG where CLNID=" & configId
+ ' obj.ConnExec(sql)
+ ' sql = "DELETE from Config_List_Name where ID=" & configId
+ ' obj.ConnExec(sql)
+ ' End If
+ 'End While
+ 'rs.Close()
+ 'rs = Nothing
+ 'cmd = Nothing
+ 'sql = "DELETE from " & strSqlTable & " where ID=" & lngCalId
+ 'obj.ConnExec(sql)
+ if not CaliberInventory.Delete(DatabasePath, lngCalId, _errOut) then throw new Exception(_errOut)
Call RefreshCalData()
Call RefreshConfigData()
Cursor = Cursors.Arrow
@@ -1485,8 +1802,8 @@ Public Class MdiParentMain
''' The instance containing the event data.
Private Sub LoadedAmmunitionToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LoadedAmmunitionToolStripMenuItem.Click
Cursor = Cursors.WaitCursor
- frmView_Loaded_Ammunition.MdiParent = Me
- frmView_Loaded_Ammunition.Show()
+ FrmViewLoadedAmmunition.MdiParent = Me
+ FrmViewLoadedAmmunition.Show()
Cursor = Cursors.Arrow
End Sub
'''
@@ -1497,7 +1814,7 @@ Public Class MdiParentMain
Private Sub ReRunHotfixUpdatesToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ReRunHotfixUpdatesToolStripMenuItem.Click
DoAutoBackup = False
Dim myProcess As New Process
- myProcess.StartInfo.FileName = MyHotfixFile
+ myProcess.StartInfo.FileName = GeneralSettings.MY_HOTFIX_FILE
myProcess.StartInfo.Arguments = "/redo"
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.Start()
@@ -1540,8 +1857,8 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub ShotListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ShotListToolStripMenuItem.Click
- frmView_List_Shot.MdiParent = Me
- frmView_List_Shot.Show()
+ FrmViewListShot.MdiParent = Me
+ FrmViewListShot.Show()
End Sub
'''
''' Handles the Click event of the SlugListToolStripMenuItem control.
@@ -1549,8 +1866,8 @@ Public Class MdiParentMain
''' The source of the event.
''' The instance containing the event data.
Private Sub SlugListToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SlugListToolStripMenuItem.Click
- frmView_List_Slug.MdiParent = Me
- frmView_List_Slug.Show()
+ FrmViewListSlug.MdiParent = Me
+ FrmViewListSlug.Show()
End Sub
'''
''' Handles the Click event of the SlugInventoryToolStripMenuItem control.
diff --git a/BSMyLoadersLog/MLL.ldb b/BSMyLoadersLog/MLL.ldb
deleted file mode 100644
index 011d430..0000000
Binary files a/BSMyLoadersLog/MLL.ldb and /dev/null differ
diff --git a/BSMyLoadersLog/MLL.mdb b/BSMyLoadersLog/MLL.mdb
index e149382..67420ac 100644
Binary files a/BSMyLoadersLog/MLL.mdb and b/BSMyLoadersLog/MLL.mdb differ
diff --git a/BSMyLoadersLog/MLLDataSet.Designer.vb b/BSMyLoadersLog/MLLDataSet.Designer.vb
index 21264b2..aa1be51 100644
--- a/BSMyLoadersLog/MLLDataSet.Designer.vb
+++ b/BSMyLoadersLog/MLLDataSet.Designer.vb
@@ -16242,6 +16242,10 @@ Partial Public Class MLLDataSet
Private columnPrice As Global.System.Data.DataColumn
+ Private columnounces As Global.System.Data.DataColumn
+
+ Private columngrams As Global.System.Data.DataColumn
+
_
Public Sub New()
@@ -16365,6 +16369,22 @@ Partial Public Class MLLDataSet
End Get
End Property
+ _
+ Public ReadOnly Property ouncesColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnounces
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property gramsColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columngrams
+ End Get
+ End Property
+
_
@@ -16402,9 +16422,9 @@ Partial Public Class MLLDataSet
_
- Public Overloads Function AddList_SG_ShotType_DetailsRow(ByVal Manufacturer As String, ByVal Name As String, ByVal IsSlug As Integer, ByVal mat As String, ByVal ShotNo As String, ByVal weight As String, ByVal CAL As String, ByVal Qty As Integer, ByVal epps As Double, ByVal Price As Double) As List_SG_ShotType_DetailsRow
+ Public Overloads Function AddList_SG_ShotType_DetailsRow(ByVal Manufacturer As String, ByVal Name As String, ByVal IsSlug As Integer, ByVal mat As String, ByVal ShotNo As String, ByVal weight As String, ByVal CAL As String, ByVal Qty As Integer, ByVal epps As Double, ByVal Price As Double, ByVal ounces As Double, ByVal grams As Double) As List_SG_ShotType_DetailsRow
Dim rowList_SG_ShotType_DetailsRow As List_SG_ShotType_DetailsRow = CType(Me.NewRow,List_SG_ShotType_DetailsRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price}
+ Dim columnValuesArray() As Object = New Object() {Nothing, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price, ounces, grams}
rowList_SG_ShotType_DetailsRow.ItemArray = columnValuesArray
Me.Rows.Add(rowList_SG_ShotType_DetailsRow)
Return rowList_SG_ShotType_DetailsRow
@@ -16444,6 +16464,8 @@ Partial Public Class MLLDataSet
Me.columnQty = MyBase.Columns("Qty")
Me.columnepps = MyBase.Columns("epps")
Me.columnPrice = MyBase.Columns("Price")
+ Me.columnounces = MyBase.Columns("ounces")
+ Me.columngrams = MyBase.Columns("grams")
End Sub
_
+ Public Property ounces() As Double
+ Get
+ Try
+ Return CType(Me(Me.tableList_SG_ShotType_Details.ouncesColumn),Double)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'ounces' in table 'List_SG_ShotType_Details' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableList_SG_ShotType_Details.ouncesColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property grams() As Double
+ Get
+ Try
+ Return CType(Me(Me.tableList_SG_ShotType_Details.gramsColumn),Double)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'grams' in table 'List_SG_ShotType_Details' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableList_SG_ShotType_Details.gramsColumn) = value
+ End Set
+ End Property
+
_
Public Function IsManufacturerNull() As Boolean
@@ -27357,6 +27413,30 @@ Partial Public Class MLLDataSet
Public Sub SetPriceNull()
Me(Me.tableList_SG_ShotType_Details.PriceColumn) = Global.System.Convert.DBNull
End Sub
+
+ _
+ Public Function IsouncesNull() As Boolean
+ Return Me.IsNull(Me.tableList_SG_ShotType_Details.ouncesColumn)
+ End Function
+
+ _
+ Public Sub SetouncesNull()
+ Me(Me.tableList_SG_ShotType_Details.ouncesColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsgramsNull() As Boolean
+ Return Me.IsNull(Me.tableList_SG_ShotType_Details.gramsColumn)
+ End Function
+
+ _
+ Public Sub SetgramsNull()
+ Me(Me.tableList_SG_ShotType_Details.gramsColumn) = Global.System.Convert.DBNull
+ End Sub
End Class
'''
@@ -51043,6 +51123,8 @@ Namespace MLLDataSetTableAdapters
tableMapping.ColumnMappings.Add("Qty", "Qty")
tableMapping.ColumnMappings.Add("epps", "epps")
tableMapping.ColumnMappings.Add("Price", "Price")
+ tableMapping.ColumnMappings.Add("ounces", "ounces")
+ tableMapping.ColumnMappings.Add("grams", "grams")
Me._adapter.TableMappings.Add(tableMapping)
Me._adapter.DeleteCommand = New Global.System.Data.OleDb.OleDbCommand()
Me._adapter.DeleteCommand.Connection = Me.Connection
@@ -51053,7 +51135,8 @@ Namespace MLLDataSetTableAdapters
")) AND ((? = 1 AND `weight` IS NULL) OR (`weight` = ?)) AND ((? = 1 AND `CAL` IS"& _
" NULL) OR (`CAL` = ?)) AND ((? = 1 AND `Qty` IS NULL) OR (`Qty` = ?)) AND ((? = "& _
"1 AND `epps` IS NULL) OR (`epps` = ?)) AND ((? = 1 AND `Price` IS NULL) OR (`Pri"& _
- "ce` = ?)))"
+ "ce` = ?)) AND ((? = 1 AND `ounces` IS NULL) OR (`ounces` = ?)) AND ((? = 1 AND `"& _
+ "grams` IS NULL) OR (`grams` = ?)))"
Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, false, Nothing))
Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Manufacturer", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Manufacturer", Global.System.Data.DataRowVersion.Original, true, Nothing))
@@ -51076,11 +51159,15 @@ Namespace MLLDataSetTableAdapters
Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_epps", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "epps", Global.System.Data.DataRowVersion.Original, false, Nothing))
Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Price", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Original, true, Nothing))
Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Price", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Original, false, Nothing))
+ Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_ounces", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Original, true, Nothing))
+ Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ounces", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Original, false, Nothing))
+ Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_grams", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Original, true, Nothing))
+ Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_grams", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Original, false, Nothing))
Me._adapter.InsertCommand = New Global.System.Data.OleDb.OleDbCommand()
Me._adapter.InsertCommand.Connection = Me.Connection
Me._adapter.InsertCommand.CommandText = "INSERT INTO `List_SG_ShotType_Details` (`Manufacturer`, `Name`, `IsSlug`, `mat`, "& _
- "`ShotNo`, `weight`, `CAL`, `Qty`, `epps`, `Price`) VALUES (?, ?, ?, ?, ?, ?, ?, "& _
- "?, ?, ?)"
+ "`ShotNo`, `weight`, `CAL`, `Qty`, `epps`, `Price`, `ounces`, `grams`) VALUES (?,"& _
+ " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Manufacturer", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Manufacturer", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Name", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Name", Global.System.Data.DataRowVersion.Current, false, Nothing))
@@ -51092,17 +51179,21 @@ Namespace MLLDataSetTableAdapters
Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Qty", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Qty", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("epps", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "epps", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Price", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Current, false, Nothing))
+ Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ounces", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Current, false, Nothing))
+ Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("grams", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.UpdateCommand = New Global.System.Data.OleDb.OleDbCommand()
Me._adapter.UpdateCommand.Connection = Me.Connection
Me._adapter.UpdateCommand.CommandText = "UPDATE `List_SG_ShotType_Details` SET `Manufacturer` = ?, `Name` = ?, `IsSlug` = "& _
"?, `mat` = ?, `ShotNo` = ?, `weight` = ?, `CAL` = ?, `Qty` = ?, `epps` = ?, `Pri"& _
- "ce` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `Manufacturer` IS NULL) OR (`Manufactu"& _
- "rer` = ?)) AND ((? = 1 AND `Name` IS NULL) OR (`Name` = ?)) AND ((? = 1 AND `IsS"& _
- "lug` IS NULL) OR (`IsSlug` = ?)) AND ((? = 1 AND `mat` IS NULL) OR (`mat` = ?)) "& _
- "AND ((? = 1 AND `ShotNo` IS NULL) OR (`ShotNo` = ?)) AND ((? = 1 AND `weight` IS"& _
- " NULL) OR (`weight` = ?)) AND ((? = 1 AND `CAL` IS NULL) OR (`CAL` = ?)) AND ((?"& _
- " = 1 AND `Qty` IS NULL) OR (`Qty` = ?)) AND ((? = 1 AND `epps` IS NULL) OR (`epp"& _
- "s` = ?)) AND ((? = 1 AND `Price` IS NULL) OR (`Price` = ?)))"
+ "ce` = ?, `ounces` = ?, `grams` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `Manufactur"& _
+ "er` IS NULL) OR (`Manufacturer` = ?)) AND ((? = 1 AND `Name` IS NULL) OR (`Name`"& _
+ " = ?)) AND ((? = 1 AND `IsSlug` IS NULL) OR (`IsSlug` = ?)) AND ((? = 1 AND `mat"& _
+ "` IS NULL) OR (`mat` = ?)) AND ((? = 1 AND `ShotNo` IS NULL) OR (`ShotNo` = ?)) "& _
+ "AND ((? = 1 AND `weight` IS NULL) OR (`weight` = ?)) AND ((? = 1 AND `CAL` IS NU"& _
+ "LL) OR (`CAL` = ?)) AND ((? = 1 AND `Qty` IS NULL) OR (`Qty` = ?)) AND ((? = 1 A"& _
+ "ND `epps` IS NULL) OR (`epps` = ?)) AND ((? = 1 AND `Price` IS NULL) OR (`Price`"& _
+ " = ?)) AND ((? = 1 AND `ounces` IS NULL) OR (`ounces` = ?)) AND ((? = 1 AND `gra"& _
+ "ms` IS NULL) OR (`grams` = ?)))"
Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Manufacturer", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Manufacturer", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Name", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Name", Global.System.Data.DataRowVersion.Current, false, Nothing))
@@ -51114,6 +51205,8 @@ Namespace MLLDataSetTableAdapters
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Qty", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Qty", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("epps", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "epps", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Price", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Current, false, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ounces", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Current, false, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("grams", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Current, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Manufacturer", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Manufacturer", Global.System.Data.DataRowVersion.Original, true, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Manufacturer", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Manufacturer", Global.System.Data.DataRowVersion.Original, false, Nothing))
@@ -51135,6 +51228,10 @@ Namespace MLLDataSetTableAdapters
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_epps", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "epps", Global.System.Data.DataRowVersion.Original, false, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Price", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Original, true, Nothing))
Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Price", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Price", Global.System.Data.DataRowVersion.Original, false, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_ounces", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Original, true, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ounces", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ounces", Global.System.Data.DataRowVersion.Original, false, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_grams", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Original, true, Nothing))
+ Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_grams", Global.System.Data.OleDb.OleDbType.[Double], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "grams", Global.System.Data.DataRowVersion.Original, false, Nothing))
End Sub
0 and Price > 0 o"& _
- "rder by Manufacturer,Name ASC"
+ Me._commandCollection(8).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) > 0) AND (Price > 0) ORDER BY Manufacturer, Name"
Me._commandCollection(8).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(9) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(9).Connection = Me.Connection
- Me._commandCollection(9).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)>0 and Price > 0 o"& _
- "rder by Material ASC"
+ Me._commandCollection(9).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) > 0) AND (Price > 0) ORDER BY Material"
Me._commandCollection(9).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(10) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(10).Connection = Me.Connection
- Me._commandCollection(10).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)>0 and Price > 0 o"& _
- "rder by Price ASC"
+ Me._commandCollection(10).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) > 0) AND (Price > 0) ORDER BY Price"
Me._commandCollection(10).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(11) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(11).Connection = Me.Connection
- Me._commandCollection(11).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)>0 and Price > 0 o"& _
- "rder by ShotNo ASC"
+ Me._commandCollection(11).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) > 0) AND (Price > 0) ORDER BY ShotNo"
Me._commandCollection(11).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(12) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(12).Connection = Me.Connection
- Me._commandCollection(12).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)>0 and Price > 0 o"& _
- "rder by weight ASC"
+ Me._commandCollection(12).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) > 0) AND (Price > 0) ORDER BY weight"
Me._commandCollection(12).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(13) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(13).Connection = Me.Connection
- Me._commandCollection(13).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)=0 and Price > 0 o"& _
- "rder by Manufacturer,Name ASC"
+ Me._commandCollection(13).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) = 0) AND (Price > 0) ORDER BY Manufacturer, Name"
Me._commandCollection(13).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(14) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(14).Connection = Me.Connection
- Me._commandCollection(14).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)=0 and Price > 0 o"& _
- "rder by mat ASC"
+ Me._commandCollection(14).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) = 0) AND (Price > 0) ORDER BY mat"
Me._commandCollection(14).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(15) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(15).Connection = Me.Connection
- Me._commandCollection(15).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)=0 and Price > 0 o"& _
- "rder by Price ASC"
+ Me._commandCollection(15).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) = 0) AND (Price > 0) ORDER BY Price"
Me._commandCollection(15).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(16) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(16).Connection = Me.Connection
- Me._commandCollection(16).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)=0 and Price > 0 o"& _
- "rder by ShotNo ASC"
+ Me._commandCollection(16).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) = 0) AND (Price > 0) ORDER BY ShotNo"
Me._commandCollection(16).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(17) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(17).Connection = Me.Connection
- Me._commandCollection(17).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=0 and cdbl(weight)=0 and Price = 0 o"& _
- "rder by Manufacturer,Name ASC"
+ Me._commandCollection(17).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 0) AND (cdbl(weigh"& _
+ "t) = 0) AND (Price = 0) ORDER BY Manufacturer, Name"
Me._commandCollection(17).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(18) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(18).Connection = Me.Connection
- Me._commandCollection(18).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 order by Manufacturer, Name ASC"
+ Me._commandCollection(18).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) ORDER BY Manufa"& _
+ "cturer, Name"
Me._commandCollection(18).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(19) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(19).Connection = Me.Connection
- Me._commandCollection(19).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 order by CAL ASC"
+ Me._commandCollection(19).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) ORDER BY CAL"
Me._commandCollection(19).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(20) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(20).Connection = Me.Connection
- Me._commandCollection(20).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 order by Price ASC"
+ Me._commandCollection(20).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) ORDER BY Price"
Me._commandCollection(20).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(21) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(21).Connection = Me.Connection
- Me._commandCollection(21).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 order by Qty ASC"
+ Me._commandCollection(21).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) ORDER BY Qty"
Me._commandCollection(21).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(22) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(22).Connection = Me.Connection
- Me._commandCollection(22).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 order by weight ASC"
+ Me._commandCollection(22).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) ORDER BY weight"& _
+ ""
Me._commandCollection(22).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(23) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(23).Connection = Me.Connection
- Me._commandCollection(23).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty>0 and Price > 0 order by C"& _
- "AL ASC"
+ Me._commandCollection(23).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty > 0) A"& _
+ "ND (Price > 0) ORDER BY CAL"
Me._commandCollection(23).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(24) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(24).Connection = Me.Connection
- Me._commandCollection(24).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty>0 and Price > 0 order by M"& _
- "anufacturer,Name ASC"
+ Me._commandCollection(24).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty > 0) A"& _
+ "ND (Price > 0) ORDER BY Manufacturer, Name"
Me._commandCollection(24).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(25) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(25).Connection = Me.Connection
- Me._commandCollection(25).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty>0 and Price > 0 order by P"& _
- "rice ASC"
+ Me._commandCollection(25).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty > 0) A"& _
+ "ND (Price > 0) ORDER BY Price"
Me._commandCollection(25).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(26) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(26).Connection = Me.Connection
- Me._commandCollection(26).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty>0 and Price > 0 order by Q"& _
- "ty ASC"
+ Me._commandCollection(26).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty > 0) A"& _
+ "ND (Price > 0) ORDER BY Qty"
Me._commandCollection(26).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(27) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(27).Connection = Me.Connection
- Me._commandCollection(27).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty>0 and Price > 0 order by W"& _
- "eight ASC"
+ Me._commandCollection(27).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty > 0) A"& _
+ "ND (Price > 0) ORDER BY weight"
Me._commandCollection(27).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(28) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(28).Connection = Me.Connection
- Me._commandCollection(28).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price > 0 order by C"& _
- "AL ASC"
+ Me._commandCollection(28).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price > 0) ORDER BY CAL"
Me._commandCollection(28).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(29) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(29).Connection = Me.Connection
- Me._commandCollection(29).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price > 0 order by M"& _
- "anufacturer, Name ASC"
+ Me._commandCollection(29).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price > 0) ORDER BY Manufacturer, Name"
Me._commandCollection(29).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(30) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(30).Connection = Me.Connection
- Me._commandCollection(30).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price > 0 order by P"& _
- "rice ASC"
+ Me._commandCollection(30).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price > 0) ORDER BY Price"
Me._commandCollection(30).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(31) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(31).Connection = Me.Connection
- Me._commandCollection(31).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price > 0 order by Q"& _
- "ty ASC"
+ Me._commandCollection(31).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price > 0) ORDER BY Qty"
Me._commandCollection(31).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(32) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(32).Connection = Me.Connection
- Me._commandCollection(32).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price > 0 order by w"& _
- "eight ASC"
+ Me._commandCollection(32).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price > 0) ORDER BY weight"
Me._commandCollection(32).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(33) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(33).Connection = Me.Connection
- Me._commandCollection(33).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price = 0 order by C"& _
- "AL ASC"
+ Me._commandCollection(33).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price = 0) ORDER BY CAL"
Me._commandCollection(33).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(34) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(34).Connection = Me.Connection
- Me._commandCollection(34).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price = 0 order by M"& _
- "anufacturer,Name ASC"
+ Me._commandCollection(34).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price = 0) ORDER BY Manufacturer, Name"
Me._commandCollection(34).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(35) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(35).Connection = Me.Connection
- Me._commandCollection(35).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price = 0 order by Q"& _
- "ty ASC"
+ Me._commandCollection(35).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price = 0) ORDER BY Qty"
Me._commandCollection(35).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(36) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(36).Connection = Me.Connection
- Me._commandCollection(36).CommandText = "SELECT ID, Manufacturer, Name, IsSlug, mat, ShotNo, weight, CAL, Qty, epps, Price"& _
- " FROM List_SG_ShotType_Details where IsSlug=1 and Qty=0 and Price = 0 order by w"& _
- "eight ASC"
+ Me._commandCollection(36).CommandText = "SELECT CAL, ID, IsSlug, Manufacturer, Name, Price, Qty, ShotNo, epps, grams, mat,"& _
+ " ounces, weight FROM List_SG_ShotType_Details WHERE (IsSlug = 1) AND (Qty = 0) A"& _
+ "ND (Price = 0) ORDER BY weight"
Me._commandCollection(36).CommandType = Global.System.Data.CommandType.Text
End Sub
@@ -51415,7 +51518,7 @@ Namespace MLLDataSetTableAdapters
Public Overloads Overridable Function FillBy_CFG_List_Slug(ByVal dataTable As MLLDataSet.List_SG_ShotType_DetailsDataTable, ByVal __CAL As String) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(2)
If (__CAL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("__CAL")
+ Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value
Else
Me.Adapter.SelectCommand.Parameters(0).Value = CType(__CAL,String)
End If
@@ -51433,7 +51536,7 @@ Namespace MLLDataSetTableAdapters
Public Overloads Overridable Function GetDataBy_CFG_List_Slug(ByVal __CAL As String) As MLLDataSet.List_SG_ShotType_DetailsDataTable
Me.Adapter.SelectCommand = Me.CommandCollection(2)
If (__CAL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("__CAL")
+ Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value
Else
Me.Adapter.SelectCommand.Parameters(0).Value = CType(__CAL,String)
End If
@@ -52290,7 +52393,7 @@ Namespace MLLDataSetTableAdapters
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_ID As Integer, ByVal Original_Manufacturer As String, ByVal Original_Name As String, ByVal Original_IsSlug As Global.System.Nullable(Of Integer), ByVal Original_mat As String, ByVal Original_ShotNo As String, ByVal Original_weight As String, ByVal Original_CAL As String, ByVal Original_Qty As Global.System.Nullable(Of Integer), ByVal Original_epps As Global.System.Nullable(Of Double), ByVal Original_Price As Global.System.Nullable(Of Double)) As Integer
+ Public Overloads Overridable Function Delete(ByVal Original_ID As Integer, ByVal Original_Manufacturer As String, ByVal Original_Name As String, ByVal Original_IsSlug As Global.System.Nullable(Of Integer), ByVal Original_mat As String, ByVal Original_ShotNo As String, ByVal Original_weight As String, ByVal Original_CAL As String, ByVal Original_Qty As Global.System.Nullable(Of Integer), ByVal Original_epps As Global.System.Nullable(Of Double), ByVal Original_Price As Global.System.Nullable(Of Double), ByVal Original_ounces As Global.System.Nullable(Of Double), ByVal Original_grams As Global.System.Nullable(Of Double)) As Integer
Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_ID,Integer)
If (Original_Manufacturer Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
@@ -52362,6 +52465,20 @@ Namespace MLLDataSetTableAdapters
Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value
End If
+ If (Original_ounces.HasValue = true) Then
+ Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object)
+ Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_ounces.Value,Double)
+ Else
+ Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object)
+ Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value
+ End If
+ If (Original_grams.HasValue = true) Then
+ Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object)
+ Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_grams.Value,Double)
+ Else
+ Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object)
+ Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value
+ End If
Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
<> Global.System.Data.ConnectionState.Open) Then
@@ -52381,7 +52498,7 @@ Namespace MLLDataSetTableAdapters
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal Manufacturer As String, ByVal Name As String, ByVal IsSlug As Global.System.Nullable(Of Integer), ByVal mat As String, ByVal ShotNo As String, ByVal weight As String, ByVal CAL As String, ByVal Qty As Global.System.Nullable(Of Integer), ByVal epps As Global.System.Nullable(Of Double), ByVal Price As Global.System.Nullable(Of Double)) As Integer
+ Public Overloads Overridable Function Insert(ByVal Manufacturer As String, ByVal Name As String, ByVal IsSlug As Global.System.Nullable(Of Integer), ByVal mat As String, ByVal ShotNo As String, ByVal weight As String, ByVal CAL As String, ByVal Qty As Global.System.Nullable(Of Integer), ByVal epps As Global.System.Nullable(Of Double), ByVal Price As Global.System.Nullable(Of Double), ByVal ounces As Global.System.Nullable(Of Double), ByVal grams As Global.System.Nullable(Of Double)) As Integer
If (Manufacturer Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value
Else
@@ -52432,6 +52549,16 @@ Namespace MLLDataSetTableAdapters
Else
Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value
End If
+ If (ounces.HasValue = true) Then
+ Me.Adapter.InsertCommand.Parameters(10).Value = CType(ounces.Value,Double)
+ Else
+ Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value
+ End If
+ If (grams.HasValue = true) Then
+ Me.Adapter.InsertCommand.Parameters(11).Value = CType(grams.Value,Double)
+ Else
+ Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value
+ End If
Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
<> Global.System.Data.ConnectionState.Open) Then
@@ -52462,6 +52589,8 @@ Namespace MLLDataSetTableAdapters
ByVal Qty As Global.System.Nullable(Of Integer), _
ByVal epps As Global.System.Nullable(Of Double), _
ByVal Price As Global.System.Nullable(Of Double), _
+ ByVal ounces As Global.System.Nullable(Of Double), _
+ ByVal grams As Global.System.Nullable(Of Double), _
ByVal Original_ID As Integer, _
ByVal Original_Manufacturer As String, _
ByVal Original_Name As String, _
@@ -52472,7 +52601,9 @@ Namespace MLLDataSetTableAdapters
ByVal Original_CAL As String, _
ByVal Original_Qty As Global.System.Nullable(Of Integer), _
ByVal Original_epps As Global.System.Nullable(Of Double), _
- ByVal Original_Price As Global.System.Nullable(Of Double)) As Integer
+ ByVal Original_Price As Global.System.Nullable(Of Double), _
+ ByVal Original_ounces As Global.System.Nullable(Of Double), _
+ ByVal Original_grams As Global.System.Nullable(Of Double)) As Integer
If (Manufacturer Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value
Else
@@ -52523,77 +52654,101 @@ Namespace MLLDataSetTableAdapters
Else
Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value
End If
- Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_ID,Integer)
- If (Original_Manufacturer Is Nothing) Then
- Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object)
- Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value
+ If (ounces.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(10).Value = CType(ounces.Value,Double)
Else
- Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_Manufacturer,String)
+ Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
End If
- If (Original_Name Is Nothing) Then
+ If (grams.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(11).Value = CType(grams.Value,Double)
+ Else
+ Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value
+ End If
+ Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_ID,Integer)
+ If (Original_Manufacturer Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_Name,String)
+ Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_Manufacturer,String)
End If
- If (Original_IsSlug.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_IsSlug.Value,Integer)
- Else
+ If (Original_Name Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value
+ Else
+ Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_Name,String)
End If
- If (Original_mat Is Nothing) Then
+ If (Original_IsSlug.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_IsSlug.Value,Integer)
+ Else
Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_mat,String)
End If
- If (Original_ShotNo Is Nothing) Then
+ If (Original_mat Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_ShotNo,String)
+ Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_mat,String)
End If
- If (Original_weight Is Nothing) Then
+ If (Original_ShotNo Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_weight,String)
+ Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_ShotNo,String)
End If
- If (Original_CAL Is Nothing) Then
+ If (Original_weight Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_CAL,String)
+ Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_weight,String)
End If
- If (Original_Qty.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_Qty.Value,Integer)
- Else
+ If (Original_CAL Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value
+ Else
+ Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_CAL,String)
End If
- If (Original_epps.HasValue = true) Then
+ If (Original_Qty.HasValue = true) Then
Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_epps.Value,Double)
+ Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_Qty.Value,Integer)
Else
Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value
End If
- If (Original_Price.HasValue = true) Then
+ If (Original_epps.HasValue = true) Then
Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_Price.Value,Double)
+ Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_epps.Value,Double)
Else
Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value
End If
+ If (Original_Price.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(31).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(32).Value = CType(Original_Price.Value,Double)
+ Else
+ Me.Adapter.UpdateCommand.Parameters(31).Value = CType(1,Object)
+ Me.Adapter.UpdateCommand.Parameters(32).Value = Global.System.DBNull.Value
+ End If
+ If (Original_ounces.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(33).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(34).Value = CType(Original_ounces.Value,Double)
+ Else
+ Me.Adapter.UpdateCommand.Parameters(33).Value = CType(1,Object)
+ Me.Adapter.UpdateCommand.Parameters(34).Value = Global.System.DBNull.Value
+ End If
+ If (Original_grams.HasValue = true) Then
+ Me.Adapter.UpdateCommand.Parameters(35).Value = CType(0,Object)
+ Me.Adapter.UpdateCommand.Parameters(36).Value = CType(Original_grams.Value,Double)
+ Else
+ Me.Adapter.UpdateCommand.Parameters(35).Value = CType(1,Object)
+ Me.Adapter.UpdateCommand.Parameters(36).Value = Global.System.DBNull.Value
+ End If
Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
<> Global.System.Data.ConnectionState.Open) Then
diff --git a/BSMyLoadersLog/MLLDataSet.vb b/BSMyLoadersLog/MLLDataSet.vb
index 042b662..2acbddc 100644
--- a/BSMyLoadersLog/MLLDataSet.vb
+++ b/BSMyLoadersLog/MLLDataSet.vb
@@ -1,4 +1,11 @@
Partial Class MLLDataSet
+ Partial Public Class Loaders_Log_FirearmsDataTable
+ Private Sub Loaders_Log_FirearmsDataTable_Loaders_Log_FirearmsRowChanging(sender As Object, e As BSMyLoadersLog.MLLDataSet.Loaders_Log_FirearmsRowChangeEvent) Handles Me.Loaders_Log_FirearmsRowChanging
+
+ End Sub
+
+ End Class
+
Partial Class ConfigList_Simple_SGDataTable
Private Sub ConfigList_Simple_SGDataTable_ConfigList_Simple_SGRowChanging(ByVal sender As System.Object, ByVal e As ConfigList_Simple_SGRowChangeEvent) Handles Me.ConfigList_Simple_SGRowChanging
@@ -35,3 +42,5 @@
End Class
End Class
+
+
diff --git a/BSMyLoadersLog/MLLDataSet.xsd b/BSMyLoadersLog/MLLDataSet.xsd
index d87cc47..ac304a0 100644
--- a/BSMyLoadersLog/MLLDataSet.xsd
+++ b/BSMyLoadersLog/MLLDataSet.xsd
@@ -4327,7 +4327,7 @@ FROM List_SG_Case where Qty=0 and Price=0 order by Manufacturer,Name ASC
-