Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i = ListView1.Items.Add(txtOwner.Text)
- i.SubItems.Add(txtConcernID.Text)
- i.SubItems.Add(txtPartNumber.Text)
- i.SubItems.Add(txtDefect.Text)
- i.SubItems.Add(txtQTY.Text)
- i.SubItems.Add(txtDaysInSort.Text)
- varDaysInSort = txtDaysInSort.Text
- ChangeTheColor.Start()
- ColorChange()
- Else
- MessageBox.Show("Please fill out all information boxes.")
- txtOwner.Text = ""
- txtConcernID.Text = ""
- txtPartNumber.Text = ""
- txtDefect.Text = ""
- txtQTY.Text = ""
- txtDaysInSort.Text = ""
- End If
- Catch ex As Exception
- MessageBox.Show("Please insert an integer into 'Days In Sort'.")
- txtOwner.Text = ""
- txtConcernID.Text = ""
- txtPartNumber.Text = ""
- txtDefect.Text = ""
- txtQTY.Text = ""
- txtDaysInSort.Text = ""
- End Try
- If ListView1.Items.Count = 0 Then
- Dim counter As Integer
- counter = ListView1.Items.Count
- lblConcernTotal.Text = counter
- ElseIf ListView1.Items.Count > 0 Then
- Dim counter As Integer
- counter = ListView1.Items.Count
- lblConcernTotal.Text = counter
- Else
- lblConcernTotal.Text = "0"
- End If
- lblConcernTotal.Text = ListView1.Items.Count
- End Sub
- 'This sub makes a clone of listview1 item and sends to listview2
- 'THIS IS WHERE I NEED TO TAKE INFO FROM A TEXTBOX FROM ANOTHER
- 'FORM AND SPLICE IT TO THE END OF THE LISTVIEW1 ITEM.
- 'THE TEXTBOX IS CALLED "txtRejectQTY" AND THE FORM IS CALLED
- 'RejectForm
- Private Sub AddItemToSecondList(ByVal item As ListViewItem)
- Me.ListView2.Items.Add(item.Clone())
- End Sub
- Private Sub ListView1_MouseDoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
- '~> Use the HitTest method to grab a reference to the item which was
- ' double-clicked. Note that if the user double-clicks in an empty
- ' area of the list, the HitTestInfo.Item will be Nothing (which is what
- ' what we would want to happen):
- Dim info As ListViewHitTestInfo = Me.ListView1.HitTest(e.X, e.Y)
- 'Get a reference to the item:
- Dim item As ListViewItem = info.Item
- 'Ask user for quantity of rejected glass
- RejectFormAppears()
- 'Add Reject value just entered to the end of the listviewbox
- Dim reject As String = RejectForm.txtRejectQTY.Text
- ' Make sure an item was the trget of the double-click:
- If Not item Is Nothing Then
- Me.AddItemToSecondList(item)
- End If
- RemoveItemFromFirstList(item)
- lblTotalDispositions.Text = ListView2.Items.Count
- lblConcernTotal.Text = ListView1.Items.Count
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement