Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub FixSCBBreakfastCombo()
- Dim lstSQL_1 As New List(Of String)
- Dim lstSQL_2 As New List(Of String)
- Using dtAttachments As clsDataTable = DataAccessIris.GetDT2("Select * from tbl_ItemCatLinks Where CatID = 6023")
- For i As Integer = 0 To dtAttachments.RowCount - 1
- lstSQL_1.Add("Delete from tbl_ItemAttachments where ItemNum = " & CStrNull(dtAttachments.Rows(i)!ItemNum))
- lstSQL_2.Add("INSERT tbl_ItemAttachments(ItemNum, SeqNum, InsMarker, IsModifier, IsItem, ID, MinChoices, MaxChoices," &
- "PromptSoundFile, ReplacePrice, PriceAdjust, DeductItemPrice, NoNegativePrice, AllowQTY, Destination)" &
- "Values(" & CStrNull(dtAttachments.Rows(i)!ItemNum) & ",0,0,0,1,5651,1,1,0,0.00,0,-1,0,0,0)") 'Add Hash-browns
- If PosMaint.SpecialityCoffeeStore Then
- lstSQL_2.Add("INSERT tbl_ItemAttachments(ItemNum, SeqNum, InsMarker, IsModifier, IsItem, ID, MinChoices, MaxChoices, " &
- "PromptSoundFile, ReplacePrice, PriceAdjust, DeductItemPrice, NoNegativePrice, AllowQTY, Destination)" &
- "Values(" & CStrNull(dtAttachments.Rows(i)!ItemNum) & ",1,0,0,0,2000,1,1,0,0.00,0,-1,0,0,0)") 'Special Coffee Menu
- 'PE 3/7/2022
- 'Added In you face upsize
- lstSQL_2.Add("INSERT tbl_ItemAttachments(ItemNum, SeqNum, InsMarker, IsModifier, IsItem, ID, MinChoices, MaxChoices, " &
- "PromptSoundFile, ReplacePrice, PriceAdjust, DeductItemPrice, NoNegativePrice, AllowQTY, Destination)" &
- "Values(" & CStrNull(dtAttachments.Rows(i)!ItemNum) & ",2,0,0,0,395,0,0,0,0.00,0,-1,0,0,0)") 'Menu for up sized
- Else
- lstSQL_2.Add("INSERT tbl_ItemAttachments(ItemNum, SeqNum, InsMarker, IsModifier, IsItem, ID, MinChoices, MaxChoices," &
- "PromptSoundFile, ReplacePrice, PriceAdjust, DeductItemPrice, NoNegativePrice, AllowQTY, Destination)" &
- "Values(" & CStrNull(dtAttachments.Rows(i)!ItemNum) & ",1,0,0,1,3509,1,1,0,0.00,0,-1,0,0,0)") 'Small Coffee Item
- 'PE 3/7/2022
- 'Added In you face up size
- lstSQL_2.Add("INSERT tbl_ItemAttachments(ItemNum, SeqNum, InsMarker, IsModifier, IsItem, ID, MinChoices, MaxChoices, " &
- "PromptSoundFile, ReplacePrice, PriceAdjust, DeductItemPrice, NoNegativePrice, AllowQTY, Destination)" &
- "Values(" & CStrNull(dtAttachments.Rows(i)!ItemNum) & ",2,0,0,0,395,0,0,0,0.00,0,-1,0,0,0)") 'Menu For up sized
- End If
- Next
- End Using
- 'DataAccessIris.ExecCommand("DELETE FROM TBL_ITEMATTACHMENTS WHERE ID = 3509" & vbNewLine & _
- ' "DELETE FROM TBL_ITEMATTACHMENTS WHERE ID = 5651" & vbNewLine & _
- ' "DELETE FROM TBL_ITEMATTACHMENTS WHERE ID = 2000")
- ''run the list
- If lstSQL_1.Count > 0 Then DataAccessIris.ExecCommand(Join(lstSQL_1.ToArray, vbNewLine))
- If lstSQL_2.Count > 0 Then DataAccessIris.ExecCommand(Join(lstSQL_2.ToArray, vbNewLine))
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement