Advertisement
penright

Untitled

Oct 3rd, 2023
1,583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 47.50 KB | None | 0 0
  1.     Sub FixPosCfg()
  2.         'Dim rsTimePeriods As New clsDataTable
  3.         Dim store As Integer
  4.         Dim TaxId(9) As Double
  5.         Dim tmpStoreNumber As String
  6.         Dim tmpDriveRegCount As Integer
  7.         Dim tmpPhone As String
  8.         tmpStoreNumber = PosMaint.StoreNumber.ToString.PadLeft(3, "0"c)
  9.         store = CIntNull(tmpStoreNumber)
  10.         TaxId(1) = PosMaint.TaxFtn / 100
  11.         TaxId(2) = 0
  12.         TaxId(3) = PosMaint.TaxFoodPackage / 100
  13.         TaxId(4) = PosMaint.TaxNonFoodPackage / 100
  14.         TaxId(5) = 0
  15.         TaxId(6) = 0
  16.  
  17.         '***************************************************************************
  18.         'Ready to update SQL's poscfg
  19.         '***************************************************************************
  20.         DispThis("Updating Tax Tables, ")
  21.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblTax", , , , , eErrReturn.Exception)
  22.             For xLoop As Integer = 0 To dt.RowCount - 1
  23.                 DispThis(CIntNull(dt.Rows(xLoop)!TableID).ToString & ", ")
  24.                 dt.Rows(xLoop)!AmtOrPerc = TaxId(CIntNull(dt.Rows(xLoop)!TableID))
  25.             Next
  26.             DispThis("update data table, ")
  27.             dt.UpdateData()
  28.         End Using
  29.         DispThis("Done" & NewLine)
  30.  
  31.  
  32.         DispThis("Updating Tax Category 3 (TX taxable), ")
  33.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tbl_ItemTaxCategories order by TaxCatNum", , , , , eErrReturn.Exception)
  34.             Dim drTmp As DataRow = dt.LocalWalkFindRow(New Dictionary(Of String, Object) From {{"TaxCatNum", 3}})
  35.             If drTmp IsNot Nothing Then
  36.                 If PosMaint.State.ToUpper = "TX" Then
  37.                     DispThis("TX Store, ")
  38.                     drTmp!EatInMask = "NNNYNNNNNN"
  39.                     drTmp!EatOutMask = "NNNYNNNNNN"
  40.                 ElseIf Now >= #1/1/2018# AndAlso PosMaint.State.ToUpper = "AR" Then
  41.                     DispThis("AR Store, ")
  42.                     drTmp!EatInMask = "NNNYNNNNNN"
  43.                     drTmp!EatOutMask = "NNNYNNNNNN"
  44.                 Else
  45.                     DispThis("NON-TX Store, ")
  46.                     drTmp!EatInMask = "NNYNNNNNNN"
  47.                     drTmp!EatOutMask = "NNYNNNNNNN"
  48.                 End If
  49.                 DispThis("update data table, ")
  50.                 dt.UpdateData()
  51.             Else
  52.             End If
  53.         End Using
  54.         DispThis("Done" & NewLine)
  55.  
  56.         DispThis("Updating Tax Category 5 (TX taxable), ")
  57.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tbl_ItemTaxCategories order by TaxCatNum", , , , , eErrReturn.Exception)
  58.             Dim drTmp As DataRow = dt.LocalWalkFindRow(New Dictionary(Of String, Object) From {{"TaxCatNum", 5}})
  59.             If drTmp IsNot Nothing Then
  60.                 If PosMaint.State.ToUpper = "TX" Then
  61.                     DispThis("TX Store, ")
  62.                     drTmp!EatInMask = "NNNYNNNNNN"
  63.                     drTmp!EatOutMask = "NNNYNNNNNN"
  64.                 ElseIf Now >= #1/1/2018# AndAlso PosMaint.State.ToUpper = "AR" Then
  65.                     DispThis("AR Store, ")
  66.                     drTmp!EatInMask = "NNYNNNNNNN"
  67.                     drTmp!EatOutMask = "NNYNNNNNNN"
  68.                 Else
  69.                     DispThis("NON-TX Store, ")
  70.                     drTmp!EatInMask = "NNYNNNNNNN"
  71.                     drTmp!EatOutMask = "NNYNNNNNNN"
  72.                 End If
  73.                 DispThis("update data table, ")
  74.                 dt.UpdateData()
  75.             Else
  76.             End If
  77.         End Using
  78.         DispThis("Done" & NewLine)
  79.  
  80.  
  81.         DispThis("      Updating Store Info" & NewLine)
  82.         If Len(PosMaint.Phone_Number) > 9 Then
  83.             tmpPhone = "(" + Mid(PosMaint.Phone_Number, 1, 3) + ") " + Mid(PosMaint.Phone_Number, 4, 3) + "-" + Mid(PosMaint.Phone_Number, 7)
  84.         Else
  85.             tmpPhone = PosMaint.Phone_Number
  86.         End If
  87.         DataAccessIris.ExecCommand("update tblStoreInfo Set " +
  88.                  "StoreNum=" + tmpStoreNumber + "," +
  89.                  "StoreName='Braums #" + tmpStoreNumber + "'," +
  90.                  "Address1='" + PosMaint.Address + "'," +
  91.                  "City='" + PosMaint.City + "'," +
  92.                  "StateCode='" + PosMaint.State + "'," +
  93.                  "Zip='" + PosMaint.Zip + "'," +
  94.                  "Phone='" + tmpPhone + "'" +
  95.                  "where CompanyID=0")
  96.         DispThis("      Emergency Food Stamp?" & NewLine)
  97.         If PosMaint.EmergencyFoodStampActive Then
  98.             DispThis("      Emergency Food Stamp (YES)" & NewLine)
  99.             DataAccessIris.ExecCommand("update tbl_ItemMaster Set " +
  100.                      "AllowFoodStamps='1'")
  101.             DataAccessIris.ExecCommand("update tbl_ItemMaster Set " +
  102.                      "AllowFoodStampsToGo='1'")
  103.         End If
  104.  
  105.         ''***************************************************************************************************************
  106.         'PE 8/31/2020 Use the new EOD_Time aux field
  107.         '    Also added register eod table (tblTimedRegisterEvents)
  108.         '      Event Type 1 is the EOD for registers
  109.         'Dim EODTime As Date = CDateNull("12/30/1889 " & PosMaint.EOD_Time)
  110.         Dim EODTime As Date = CDateNull("12/30/1899 " & PosMaint.EOD_Time)
  111.         Dim RegisterMinutesOffset As Integer = 10
  112.         DispThis("      Updating EOD times for Backoffice, ")
  113.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblStoreHours", , , , True)
  114.             For xLoop As Integer = 0 To dt.RowCount - 1
  115.                 dt.Rows(xLoop)!EODTime = EODTime
  116.             Next
  117.             dt.UpdateData()
  118.         End Using
  119.         'DispThis("Update with query,")
  120.         'DataAccessIris.ExecCommand("Update tblStoreHours Set EODTime ='" & PosMaint.EOD_Time & "'")
  121.         DispThis("done." & NewLine)
  122.         DispThis("      Updating EOD times for Registers, ")
  123.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblTimedRegisterEvents where EventType=1", , , , True)
  124.             Dim AddRegisters As New List(Of Integer)
  125.             Dim RemoveRegister As New List(Of Integer)
  126.             Dim RegisterList As List(Of Integer) = PosMaint.RegisterNumberList.ToList
  127.             'Lets loop through register numbers and see if any need to be added.
  128.             For xLoop As Integer = 0 To RegisterList.Count - 1
  129.                 dt.LocalWalkFindFilter(New Dictionary(Of String, Object) From {{"RegisterNum", RegisterList(xLoop)}})
  130.                 If dt.LocalWalkFindRecordNum < 0 Then AddRegisters.Add(RegisterList(xLoop))
  131.             Next
  132.             'Let loop through the data table and see if we need to remove
  133.             For xLoop As Integer = 0 To dt.RowCount - 1
  134.                 If CIntNull(dt.Rows(xLoop)!RegisterNum) <> 0 AndAlso Not RegisterList.Contains(CIntNull(dt.Rows(xLoop)!RegisterNum)) Then
  135.                     If Not RemoveRegister.Contains(CIntNull(dt.Rows(xLoop)!RegisterNum)) Then RemoveRegister.Add(CIntNull(dt.Rows(xLoop)!RegisterNum))
  136.                 End If
  137.             Next
  138.             'Now add the needed registers
  139.             For xLoop As Integer = 0 To AddRegisters.Count - 1
  140.                 For dayLoop As Integer = 1 To 7
  141.                     Dim nr As DataRow = dt.NewRow
  142.                     nr!RegisterNum = AddRegisters(xLoop)
  143.                     nr!DOWNum = dayLoop
  144.                     nr!EventType = 1
  145.                     nr!UseNextDay = 0
  146.                     nr!EventTime = EODTime.AddMinutes(RegisterMinutesOffset)
  147.                     nr!UseNextDay = 0
  148.                     nr!ElapseWeeks = 1
  149.                     nr!PostEODScript = "c:\iris\scripts\systemMaint.vbs /purgeonlogon"
  150.                     nr!PostEODEvent = 20000
  151.                     nr!Manual = 0
  152.                     dt.Rows.Add(nr)
  153.                 Next
  154.             Next
  155.             'And remove the no longer needed registers
  156.             For xLoop As Integer = 0 To RemoveRegister.Count - 1
  157.                 dt.DefaultView.RowFilter = "RegisterNum=" & RemoveRegister(xLoop)
  158.                 For recordLoop As Integer = dt.DefaultView.Count - 1 To 0 Step -1
  159.                     dt.DefaultView.Item(recordLoop).Delete()
  160.                 Next
  161.             Next
  162.             dt.UpdateData()
  163.             For xLoop As Integer = 0 To dt.RowCount - 1
  164.                 dt.Rows(xLoop)!EventTime = EODTime.AddMinutes(RegisterMinutesOffset)
  165.             Next
  166.             dt.UpdateData()
  167.         End Using
  168.         'DispThis("Update with query,")
  169.         'DataAccessIris.ExecCommand("Update tblTimedRegisterEvents Set EventTime ='" & PosMaint.EOD_Time & "'  where EventType=1")
  170.         DispThis("done." & NewLine)
  171.  
  172.  
  173.         '***************************************************************************************************************
  174.  
  175.  
  176.  
  177.         DispThis("      Updating tblcfgsettings" & NewLine)
  178.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblCfgSetting", , , , True)
  179.             dt.DefaultView.RowFilter = "SettingID=621"
  180.             If dt.DefaultView.Count > 0 Then
  181.                 DispThis("      Updating Send Grill " & (PosMaint.PrtExpoNumberPriName.ToUpper <> "NONE").ToString & NewLine)
  182.                 dt.DefaultView.Item(0)!SettingVal = (PosMaint.PrtExpoNumberPriName.ToUpper <> "NONE")
  183.             End If
  184.             dt.DefaultView.RowFilter = "SettingID=25"
  185.             If dt.DefaultView.Count > 0 Then
  186.                 DispThis("      Updating Send Events (" & PosMaint.SendToEventAdapter.ToString & ")" & NewLine)
  187.                 dt.DefaultView.Item(0)!SettingVal = PosMaint.SendToEventAdapter
  188.             End If
  189.             dt.DefaultView.RowFilter = "SettingID=221"
  190.             If dt.DefaultView.Count > 0 Then
  191.                 DispThis("      Updating Ask Tax ID Number" & NewLine)
  192.                 dt.DefaultView.Item(0)!SettingVal = (CIntNull(StoreNumber) > 400 Or
  193.                                                          PosMaint.State.ToUpper = "OK")
  194.             End If
  195.             dt.DefaultView.RowFilter = "SettingID=229"
  196.             If dt.DefaultView.Count > 0 Then
  197.                 DispThis("      Updating Ask Tax Reason" & NewLine)
  198.                 dt.DefaultView.Item(0)!SettingVal = (CIntNull(StoreNumber) > 400 Or
  199.                                                           PosMaint.State.ToUpper = "OK")
  200.             End If
  201.  
  202.             'This is a test for Robert to enforce closed drawers
  203.             'P.E. 2/8/2023
  204.             DispThis("      Updating Force Drawer Close on open tickets, ")
  205.             If IO.File.Exists("c:\ForceDrawerClose.flg") Then
  206.                 dt.DefaultView.RowFilter = "SettingID=568"
  207.                 If dt.DefaultView.Count > 0 Then
  208.                     DispThis(", 568, Yes, " & NewLine)
  209.                     dt.DefaultView.Item(0)!SettingVal = 1
  210.                 End If
  211.                 DispThis("setting button on screen")
  212.                 DataAccessIris.ExecCommand("update tbl_MenuBtns set StartX=9,StartY=347 where MenuID=50331650 and BtnValue=23")
  213.             Else
  214.                 dt.DefaultView.RowFilter = "SettingID=568"
  215.                 If dt.DefaultView.Count > 0 Then
  216.                     DispThis(", 568, No" & NewLine)
  217.                     dt.DefaultView.Item(0)!SettingVal = 0
  218.                 End If
  219.                 DispThis("setting button off screen")
  220.                 DataAccessIris.ExecCommand("update tbl_MenuBtns set StartX=542,StartY=42 where MenuID=50331650 and BtnValue=23")
  221.             End If
  222.             DispThis(NewLine)
  223.  
  224.  
  225.             'Took this out because it is being enforced everywhere and its no longer needed.
  226.             'EDIT: PCromie 11/2/2021
  227.             'DispThis("      Updating Schedule Enforce ")
  228.             'If IO.File.Exists("c:\EnforceSchedule.flg") Then
  229.             '    dt.DefaultView.RowFilter = "SettingID=542"
  230.             '    If dt.DefaultView.Count > 0 Then
  231.             '        DispThis(", 542, Yes" & NewLine)
  232.             '        dt.DefaultView.Item(0)!SettingVal = 1
  233.             '    End If
  234.             'Else
  235.             '    dt.DefaultView.RowFilter = "SettingID=542"
  236.             '    If dt.DefaultView.Count > 0 Then
  237.             '        DispThis(", 542, No" & NewLine)
  238.             '        dt.DefaultView.Item(0)!SettingVal = 0
  239.             '    End If
  240.             'End If
  241.             'DispThis(NewLine)
  242.  
  243.             DispThis("      Updating Dual Lane ")
  244.             If PosMaint.IsDualLane Then
  245.                 dt.DefaultView.RowFilter = "SettingID=670"
  246.                 If dt.DefaultView.Count > 0 Then
  247.                     DispThis(", 670, Yes" & NewLine)
  248.                     dt.DefaultView.Item(0)!SettingVal = 1
  249.                 End If
  250.                 'Starting on 4.0.9 we are setting 671
  251.                 '  (Presists lane chose).
  252.                 dt.DefaultView.RowFilter = "SettingID=671"
  253.                 If dt.DefaultView.Count > 0 Then
  254.                     DispThis(", 671, Yes" & NewLine)
  255.                     dt.DefaultView.Item(0)!SettingVal = 0
  256.                 End If
  257.             Else
  258.                 dt.DefaultView.RowFilter = "SettingID=670"
  259.                 If dt.DefaultView.Count > 0 Then
  260.                     DispThis(", 670, No" & NewLine)
  261.                     dt.DefaultView.Item(0)!SettingVal = 0
  262.                 End If
  263.                 dt.DefaultView.RowFilter = "SettingID=671"
  264.                 If dt.DefaultView.Count > 0 Then
  265.                     DispThis(", 671, No" & NewLine)
  266.                     dt.DefaultView.Item(0)!SettingVal = 0
  267.                 End If
  268.             End If
  269.             DispThis(NewLine)
  270.  
  271.  
  272.  
  273.  
  274.             'dt.DefaultView.RowFilter = "SettingID=925"
  275.             'If dt.DefaultView.Count > 0 Then
  276.             '    DispThis("      Updating Message Center Prompt at Clock in = " & PosMaint.IsBrMessage.ToString & NewLine)
  277.             '    If CBoolNull(dt.DefaultView.Item(0)!SettingVal) <> PosMaint.IsBrMessage Then dt.DefaultView.Item(0)!SettingVal = PosMaint.IsBrMessage
  278.             'End If
  279.             'dt.DefaultView.RowFilter = "SettingID=927"
  280.             'If dt.DefaultView.Count > 0 Then
  281.             '    DispThis("      Updating Manual Log on to Message Center from POS = " & PosMaint.IsBrMessage.ToString & NewLine)
  282.             '    If CBoolNull(dt.DefaultView.Item(0)!SettingVal) <> PosMaint.IsBrMessage Then dt.DefaultView.Item(0)!SettingVal = PosMaint.IsBrMessage
  283.             'End If
  284.             dt.UpdateData()
  285.         End Using
  286.  
  287.         DispThis("      Updating Reg Time Periods" & NewLine)
  288.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblTimePeriods order by PeriodID", , , , True)
  289.             For xLoop As Integer = 0 To dt.RowCount - 1
  290.                 Select Case CIntNull(dt.Rows(xLoop)("PeriodID"))
  291.                     Case 1
  292.                         dt.Rows(xLoop)("Description") = "Breakfast"
  293.                         dt.Rows(xLoop)("Sunday") = #12/30/1899 4:00:00 AM#
  294.                         dt.Rows(xLoop)("Monday") = #12/30/1899 4:00:00 AM#
  295.                         dt.Rows(xLoop)("Tuesday") = #12/30/1899 4:00:00 AM#
  296.                         dt.Rows(xLoop)("Wednesday") = #12/30/1899 4:00:00 AM#
  297.                         dt.Rows(xLoop)("Thursday") = #12/30/1899 4:00:00 AM#
  298.                         dt.Rows(xLoop)("Friday") = #12/30/1899 4:00:00 AM#
  299.                         dt.Rows(xLoop)("Saturday") = #12/30/1899 4:00:00 AM#
  300.                     Case 2
  301.                         dt.Rows(xLoop)("Description") = "Lunch/Dinner"
  302.                         dt.Rows(xLoop)("Sunday") = #12/30/1899 11:00:00 AM#
  303.                         dt.Rows(xLoop)("Monday") = #12/30/1899 10:30:00 AM#
  304.                         dt.Rows(xLoop)("Tuesday") = #12/30/1899 10:30:00 AM#
  305.                         dt.Rows(xLoop)("Wednesday") = #12/30/1899 10:30:00 AM#
  306.                         dt.Rows(xLoop)("Thursday") = #12/30/1899 10:30:00 AM#
  307.                         dt.Rows(xLoop)("Friday") = #12/30/1899 10:30:00 AM#
  308.                         dt.Rows(xLoop)("Saturday") = #12/30/1899 10:30:00 AM#
  309.                     Case 3 '.AddDays(693593) is for sql fix of a different min date
  310.                         dt.Rows(xLoop)("Description") = "Drive Breakfast Down Time"
  311.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Sunday, eTimePeriodAction.DownTime)
  312.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Monday, eTimePeriodAction.DownTime)
  313.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Tuesday, eTimePeriodAction.DownTime)
  314.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Wednesday, eTimePeriodAction.DownTime)
  315.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Thursday, eTimePeriodAction.DownTime)
  316.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Friday, eTimePeriodAction.DownTime)
  317.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Saturday, eTimePeriodAction.DownTime)
  318.                     Case 4 '.AddDays(693593) is for sql fix of a different min date
  319.                         dt.Rows(xLoop)("Description") = "Drive Breakfast Up Time"
  320.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Sunday, eTimePeriodAction.UpTime)
  321.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Monday, eTimePeriodAction.UpTime)
  322.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Tuesday, eTimePeriodAction.UpTime)
  323.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Wednesday, eTimePeriodAction.UpTime)
  324.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Thursday, eTimePeriodAction.UpTime)
  325.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Friday, eTimePeriodAction.UpTime)
  326.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.BreakFast, Windows.Forms.Day.Saturday, eTimePeriodAction.UpTime)
  327.                     Case 5 '.AddDays(693593) is for sql fix of a different min date
  328.                         dt.Rows(xLoop)("Description") = "Drive Lunch Down Time"
  329.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Sunday, eTimePeriodAction.DownTime)
  330.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Monday, eTimePeriodAction.DownTime)
  331.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Tuesday, eTimePeriodAction.DownTime)
  332.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Wednesday, eTimePeriodAction.DownTime)
  333.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Thursday, eTimePeriodAction.DownTime)
  334.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Friday, eTimePeriodAction.DownTime)
  335.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Saturday, eTimePeriodAction.DownTime)
  336.                     Case 6 '.AddDays(693593) is for sql fix of a different min date
  337.                         dt.Rows(xLoop)("Description") = "Drive Lunch Up Time"
  338.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Sunday, eTimePeriodAction.UpTime)
  339.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Monday, eTimePeriodAction.UpTime)
  340.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Tuesday, eTimePeriodAction.UpTime)
  341.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Wednesday, eTimePeriodAction.UpTime)
  342.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Thursday, eTimePeriodAction.UpTime)
  343.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Friday, eTimePeriodAction.UpTime)
  344.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Lunch, Windows.Forms.Day.Saturday, eTimePeriodAction.UpTime)
  345.                     Case 7 '.AddDays(693593) is for sql fix of a different min date
  346.                         dt.Rows(xLoop)("Description") = "Drive Dinner Down Time"
  347.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Sunday, eTimePeriodAction.DownTime)
  348.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Monday, eTimePeriodAction.DownTime)
  349.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Tuesday, eTimePeriodAction.DownTime)
  350.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Wednesday, eTimePeriodAction.DownTime)
  351.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Thursday, eTimePeriodAction.DownTime)
  352.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Friday, eTimePeriodAction.DownTime)
  353.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Saturday, eTimePeriodAction.DownTime)
  354.                     Case 8 '.AddDays(693593) is for sql fix of a different min date
  355.                         dt.Rows(xLoop)("Description") = "Drive Dinner Up Time"
  356.                         dt.Rows(xLoop)("Sunday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Sunday, eTimePeriodAction.UpTime)
  357.                         dt.Rows(xLoop)("Monday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Monday, eTimePeriodAction.UpTime)
  358.                         dt.Rows(xLoop)("Tuesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Tuesday, eTimePeriodAction.UpTime)
  359.                         dt.Rows(xLoop)("Wednesday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Wednesday, eTimePeriodAction.UpTime)
  360.                         dt.Rows(xLoop)("Thursday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Thursday, eTimePeriodAction.UpTime)
  361.                         dt.Rows(xLoop)("Friday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Friday, eTimePeriodAction.UpTime)
  362.                         dt.Rows(xLoop)("Saturday") = PosMaint.DriveTenderBlockReg(eTimePeriod.Dinner, Windows.Forms.Day.Saturday, eTimePeriodAction.UpTime)
  363.                 End Select
  364.             Next
  365.             dt.UpdateData()
  366.         End Using
  367.         DispThis("      Updating Reg Mode DefSetting" & NewLine)
  368.         'RegModeID  SettingID   SettingVal  SettingValEx
  369.         '51         511         1    *Controls the sign in Function
  370.         '51         512         0    *Controls the Clock in\Out Function
  371.         '51         519         1    *Controls the Order Entry Timeout Function
  372.         '51         548         0    *Controls the Intermediate Screen Function
  373.  
  374.  
  375.         Dim cmdparmRegModDeSetting(3) As Common.DbParameter
  376.         cmdparmRegModDeSetting(0) = DataAccessIris.DBParameter
  377.         cmdparmRegModDeSetting(1) = DataAccessIris.DBParameter
  378.         cmdparmRegModDeSetting(2) = DataAccessIris.DBParameter
  379.         cmdparmRegModDeSetting(3) = DataAccessIris.DBParameter
  380.         cmdparmRegModDeSetting(0).ParameterName = "@RegModeID"
  381.         cmdparmRegModDeSetting(1).ParameterName = "@SettingID"
  382.         cmdparmRegModDeSetting(2).ParameterName = "@SettingVal"
  383.         cmdparmRegModDeSetting(3).ParameterName = "@SettingValEx"
  384.         Dim strSQL As String = "update tblCFGRegModeDefSetting Set " &
  385.                                         "SettingVal = @SettingVal, " &
  386.                                         "SettingValEx = @SettingValEx " &
  387.                                      "Where " &
  388.                                         "RegModeID = @RegModeID and " &
  389.                                         "SettingID = @SettingID "
  390.  
  391.         cmdparmRegModDeSetting(0).Value = 51 'Fresh Market
  392.         If PosMaint.RegisterAutoLogOutTimeFreshMarket > 0 Then
  393.             cmdparmRegModDeSetting(1).Value = 511
  394.             cmdparmRegModDeSetting(2).Value = 1
  395.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  396.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  397.             cmdparmRegModDeSetting(1).Value = 512
  398.             cmdparmRegModDeSetting(2).Value = 0
  399.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  400.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  401.             cmdparmRegModDeSetting(1).Value = 519
  402.             cmdparmRegModDeSetting(2).Value = 1
  403.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  404.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  405.             cmdparmRegModDeSetting(1).Value = 548
  406.             cmdparmRegModDeSetting(2).Value = 0
  407.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  408.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  409.         Else
  410.             cmdparmRegModDeSetting(1).Value = 511
  411.             cmdparmRegModDeSetting(2).Value = 0
  412.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  413.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  414.             cmdparmRegModDeSetting(1).Value = 512
  415.             cmdparmRegModDeSetting(2).Value = 1
  416.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  417.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  418.             cmdparmRegModDeSetting(1).Value = 519
  419.             cmdparmRegModDeSetting(2).Value = 0
  420.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  421.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  422.             cmdparmRegModDeSetting(1).Value = 548
  423.             cmdparmRegModDeSetting(2).Value = 1
  424.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  425.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  426.         End If
  427.  
  428.         cmdparmRegModDeSetting(0).Value = 61 'Fountain
  429.         If PosMaint.RegisterAutoLogOutTimeFountain > 0 Then
  430.             cmdparmRegModDeSetting(1).Value = 511
  431.             cmdparmRegModDeSetting(2).Value = 1
  432.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  433.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  434.             cmdparmRegModDeSetting(1).Value = 512
  435.             cmdparmRegModDeSetting(2).Value = 0
  436.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  437.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  438.             cmdparmRegModDeSetting(1).Value = 519
  439.             cmdparmRegModDeSetting(2).Value = 1
  440.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  441.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  442.             cmdparmRegModDeSetting(1).Value = 548
  443.             cmdparmRegModDeSetting(2).Value = 0
  444.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  445.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  446.         Else
  447.             cmdparmRegModDeSetting(1).Value = 511
  448.             cmdparmRegModDeSetting(2).Value = 0
  449.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  450.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  451.             cmdparmRegModDeSetting(1).Value = 512
  452.             cmdparmRegModDeSetting(2).Value = 1
  453.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  454.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  455.             cmdparmRegModDeSetting(1).Value = 519
  456.             cmdparmRegModDeSetting(2).Value = 0
  457.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  458.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  459.             cmdparmRegModDeSetting(1).Value = 548
  460.             cmdparmRegModDeSetting(2).Value = 1
  461.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  462.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  463.         End If
  464.  
  465.         cmdparmRegModDeSetting(0).Value = 71 'Lobby
  466.         If PosMaint.RegisterAutoLogOutTimeLobby > 0 Then
  467.             cmdparmRegModDeSetting(1).Value = 511
  468.             cmdparmRegModDeSetting(2).Value = 1
  469.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  470.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  471.             cmdparmRegModDeSetting(1).Value = 512
  472.             cmdparmRegModDeSetting(2).Value = 0
  473.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  474.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  475.             cmdparmRegModDeSetting(1).Value = 519
  476.             cmdparmRegModDeSetting(2).Value = 1
  477.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  478.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  479.             cmdparmRegModDeSetting(1).Value = 548
  480.             cmdparmRegModDeSetting(2).Value = 0
  481.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  482.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  483.         Else
  484.             cmdparmRegModDeSetting(1).Value = 511
  485.             cmdparmRegModDeSetting(2).Value = 0
  486.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  487.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  488.             cmdparmRegModDeSetting(1).Value = 512
  489.             cmdparmRegModDeSetting(2).Value = 1
  490.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  491.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  492.             cmdparmRegModDeSetting(1).Value = 519
  493.             cmdparmRegModDeSetting(2).Value = 0
  494.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  495.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  496.             cmdparmRegModDeSetting(1).Value = 548
  497.             cmdparmRegModDeSetting(2).Value = 1
  498.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  499.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  500.         End If
  501.  
  502.         cmdparmRegModDeSetting(0).Value = 11 'Drive All
  503.         If PosMaint.RegisterAutoLogOutTimeDrive > 0 Then
  504.             cmdparmRegModDeSetting(1).Value = 511
  505.             cmdparmRegModDeSetting(2).Value = 1
  506.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  507.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  508.             cmdparmRegModDeSetting(1).Value = 512
  509.             cmdparmRegModDeSetting(2).Value = 0
  510.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  511.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  512.             cmdparmRegModDeSetting(1).Value = 519
  513.             cmdparmRegModDeSetting(2).Value = 1
  514.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  515.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  516.             cmdparmRegModDeSetting(1).Value = 548
  517.             cmdparmRegModDeSetting(2).Value = 0
  518.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  519.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  520.         Else
  521.             cmdparmRegModDeSetting(1).Value = 511
  522.             cmdparmRegModDeSetting(2).Value = 0
  523.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  524.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  525.             cmdparmRegModDeSetting(1).Value = 512
  526.             cmdparmRegModDeSetting(2).Value = 1
  527.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  528.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  529.             cmdparmRegModDeSetting(1).Value = 519
  530.             cmdparmRegModDeSetting(2).Value = 0
  531.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  532.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  533.             cmdparmRegModDeSetting(1).Value = 548
  534.             cmdparmRegModDeSetting(2).Value = 1
  535.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  536.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  537.         End If
  538.  
  539.         cmdparmRegModDeSetting(0).Value = 13 'Drive Split Screen / Exp
  540.         If PosMaint.RegisterAutoLogOutTimeDrive > 0 Then
  541.             cmdparmRegModDeSetting(1).Value = 511
  542.             cmdparmRegModDeSetting(2).Value = 1
  543.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  544.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  545.             cmdparmRegModDeSetting(1).Value = 519
  546.             cmdparmRegModDeSetting(2).Value = 1
  547.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  548.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  549.         Else
  550.             cmdparmRegModDeSetting(1).Value = 511
  551.             cmdparmRegModDeSetting(2).Value = 0
  552.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  553.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  554.             cmdparmRegModDeSetting(1).Value = 519
  555.             cmdparmRegModDeSetting(2).Value = 0
  556.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  557.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  558.         End If
  559.         '************************************************************************************************************************
  560.         'Added 7/23/2018 by Pcromie
  561.         'at Klucas Request
  562.         'Paul E. 6/30/2020
  563.         'Setting ID 323 (Qty Seat Toggle/Bag Total) and 1101 (Hide Bag On Guest Check)
  564.         '    Before Dual lane vs Single lane were different configurations. Drew wanted the Single lanes
  565.         '      to work like the Dual lanes, so for now even though we test if dual lane, they are the same.
  566.         '      Use to be 323=0 and 1101=1 in dual lane. Flip them for single lane.
  567.         '    Once this has been in the field, they can be removed and just maintained via the SyncV3.
  568.         cmdparmRegModDeSetting(0).Value = 3 'Dual Lane Split Check Cashier
  569.         If PosMaint.IsDualLane Then
  570.             cmdparmRegModDeSetting(1).Value = 323
  571.             cmdparmRegModDeSetting(2).Value = 0
  572.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  573.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  574.             cmdparmRegModDeSetting(1).Value = 1101
  575.             cmdparmRegModDeSetting(2).Value = 1
  576.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  577.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  578.         Else
  579.             cmdparmRegModDeSetting(1).Value = 323
  580.             cmdparmRegModDeSetting(2).Value = 0
  581.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  582.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  583.             cmdparmRegModDeSetting(1).Value = 1101
  584.             cmdparmRegModDeSetting(2).Value = 1
  585.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  586.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  587.         End If
  588.  
  589.         cmdparmRegModDeSetting(0).Value = 2 'Dual Lane Split Check OrderTaker
  590.         If PosMaint.IsDualLane Then
  591.             cmdparmRegModDeSetting(1).Value = 323
  592.             cmdparmRegModDeSetting(2).Value = 0
  593.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  594.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  595.             cmdparmRegModDeSetting(1).Value = 1101
  596.             cmdparmRegModDeSetting(2).Value = 1
  597.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  598.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  599.         Else
  600.             cmdparmRegModDeSetting(1).Value = 323
  601.             cmdparmRegModDeSetting(2).Value = 0
  602.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  603.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  604.             cmdparmRegModDeSetting(1).Value = 1101
  605.             cmdparmRegModDeSetting(2).Value = 1
  606.             cmdparmRegModDeSetting(3).Value = DBNull.Value
  607.             DataAccessIris.ExecCommand(strSQL, cmdparmRegModDeSetting)
  608.         End If
  609.         '************************************************************************************************************************
  610.  
  611.  
  612.         DispThis("      Updating Concepts" & NewLine)
  613.         DispThis("        Set Group Order (YES)" & NewLine)
  614.         DataAccessIris.ExecCommand("Update tblConcept Set OrderEntryToolBarID = '67108896' where conceptID =12 or conceptID =15")
  615.  
  616.         DispThis("      Updating tblConcepts Tender Screen, ")
  617.         DispThis("HeartSIP, ")
  618.         DataAccessIris.ExecCommand("Update tblConcept Set TenderFunctionsID = 50331660, TenderToolBarID = 67108870 Where ConceptID in (21,22)")
  619.         DataAccessIris.ExecCommand("Update tblConcept Set TenderFunctionsID = 50331660, TenderToolBarID = 67108870 Where ConceptID = 13")
  620.         DataAccessIris.ExecCommand("Update tblConcept Set TenderFunctionsID = 50331660, TenderToolBarID = 67108870 Where ConceptID in (12,15)")
  621.         DataAccessIris.ExecCommand("Update tblConcept Set TenderFunctionsID = 50331660, TenderToolBarID = 67108886 Where ConceptID in (18,19,20,25,26,27,28,30,31,32,33,35,36)")
  622.  
  623.         DispThis("      Updating tblConcepts Dual Lane, ")
  624.         If PosMaint.IsDualLane Then
  625.             DispThis("Dual Lane, ")
  626.             DataAccessIris.ExecCommand("Update tblConcept Set TenderToolBarID = 67108868 Where ConceptID in (27,28)")
  627.         Else
  628.             DispThis("Single Lane, ")
  629.             DataAccessIris.ExecCommand("Update tblConcept Set TenderToolBarID = 67108886 Where ConceptID in (27,28)")
  630.         End If
  631.  
  632.         DispThis("Done." & NewLine)
  633.  
  634.         DispThis("      Updating tbl_MenuBtns Gift Card Screen, ")
  635.         DispThis("HeartSIP, ")
  636.         DataAccessIris.ExecCommand("Update tbl_MenuBtns Set BtnValue = 316 Where BtnValue = 40 and BtnType = 4 and Style = 1124")
  637.         DispThis("Done." & NewLine)
  638.  
  639.         'Added 3/28/2016 by PCromie
  640.         DispThis("Fixing Manual Entered Credit Cards...")
  641.         Using PTConfig As clsDataTable = DataAccessIris.GetDT2("Select * from tbl_PayTypeConfig where ConfigID = 5066", , , , , eErrReturn.Exception)
  642.             For xloop As Integer = 0 To PTConfig.Rows.Count - 1
  643.                 'loop through each row and set the values to 1 if it is portico
  644.                 PTConfig.Rows(xloop)!Amt = 0
  645.             Next
  646.             PTConfig.UpdateData()
  647.         End Using
  648.         DispThis(" Done" & NewLine)
  649.  
  650.         DispThis("Requires Encryption for Credit Cards...")
  651.         Using PTConfig As clsDataTable = DataAccessIris.GetDT2("Select * from tbl_PayTypeConfig where ConfigID = 5125", , , , , eErrReturn.Exception)
  652.             For xloop As Integer = 0 To PTConfig.Rows.Count - 1
  653.                 'loop through each row and set the values to 1 if it is portico
  654.                 PTConfig.Rows(xloop)!Amt = 1
  655.             Next
  656.             PTConfig.UpdateData()
  657.         End Using
  658.         DispThis(" Done" & NewLine)
  659.  
  660.  
  661.         '***************************************************************************************************************************************
  662.         'PE 09/20/2023
  663.         'Implement new drive via concepts, aux setting 'Quick'
  664.         DispThis("      Updating Reg Time Concepts" & NewLine)
  665.         tmpDriveRegCount = 0
  666.         DataAccessIris.ExecCommand("Delete from tblRegTimeConcepts")
  667.         Using dt As clsDataTable = DataAccessIris.GetDT2("Select * from tblRegTimeConcepts", , , , True)
  668.             For xLoop As Integer = 0 To PosMaint.RegisterInformations.Count - 1
  669.                 Dim RegInfo As PosMaint10.RegInfo = PosMaint.RegisterInformations(xLoop)
  670.                 Select Case RegInfo.DefaultConcept
  671.                     Case eDefaultConcept.FreshMarket
  672.                         UpdatetblRegTimeConcepts(21, "Package Breakfast", RegInfo.RegisterNumber, 1, 0)
  673.                         UpdatetblRegTimeConcepts(22, "Package Lunch", RegInfo.RegisterNumber, 2, 0)
  674.                     Case eDefaultConcept.Fountain
  675.                         UpdatetblRegTimeConcepts(13, "Fountain Breakfast", RegInfo.RegisterNumber, 1, 0)
  676.                         UpdatetblRegTimeConcepts(13, "Fountain Lunch", RegInfo.RegisterNumber, 2, 0)
  677.                     Case eDefaultConcept.Lobby
  678.                         UpdatetblRegTimeConcepts(12, "Lobby Breakfast", RegInfo.RegisterNumber, 1, 0)
  679.                         UpdatetblRegTimeConcepts(15, "Lobby Lunch", RegInfo.RegisterNumber, 2, 0)
  680.                     Case eDefaultConcept.SplitScreen
  681.                         If PosMaint.DriveStyle.ToUpper = "QUICK" Then
  682.                             UpdatetblRegTimeConcepts(1000, "Drive Expo Breakfast (Order Only/No Cash Dawer)", RegInfo.RegisterNumber, 1, 0)
  683.                             UpdatetblRegTimeConcepts(1001, "Drive Expo Lunch (Order Only/No Cash Dawer)", RegInfo.RegisterNumber, 2, 0)
  684.                         Else
  685.                             UpdatetblRegTimeConcepts(18, "Drive Expo Breakfast (800X600)", RegInfo.RegisterNumber, 1, 0)
  686.                             UpdatetblRegTimeConcepts(19, "Drive Expo Lunch (800X600)", RegInfo.RegisterNumber, 2, 0)
  687.                         End If
  688.                     Case eDefaultConcept.Tender
  689.                         If PosMaint.DriveStyle.ToUpper = "QUICK" Then
  690.                             If PosMaint.IsDualLane Then
  691.                                 UpdatetblRegTimeConcepts(2100, "Drive Breakfast Tender 2 Lane", RegInfo.RegisterNumber, 1, 0)
  692.                                 UpdatetblRegTimeConcepts(2102, "Drive Lunch Tender 2 Lane", RegInfo.RegisterNumber, 2, 0)
  693.                             Else
  694.                                 UpdatetblRegTimeConcepts(2100, "Drive Breakfast Tender 1 Lane", RegInfo.RegisterNumber, 1, 0)
  695.                                 UpdatetblRegTimeConcepts(2102, "Drive Lunch Tender 1 Lane", RegInfo.RegisterNumber, 2, 0)
  696.                             End If
  697.                         Else
  698.                             UpdatetblRegTimeConcepts(27, "Drive Breakfast Tender", RegInfo.RegisterNumber, 1, 0)
  699.                             UpdatetblRegTimeConcepts(28, "Drive Lunch Tender", RegInfo.RegisterNumber, 2, 0)
  700.                         End If
  701.                     Case eDefaultConcept.RegisterDown
  702.                         UpdatetblRegTimeConcepts(29, "Drive Breakfast Tender Down", RegInfo.RegisterNumber, 1, 0)
  703.                         UpdatetblRegTimeConcepts(29, "Drive Breakfast Tender Down", RegInfo.RegisterNumber, 2, 0)
  704.                     Case eDefaultConcept.TenderBlockReg
  705.                         If PosMaint.DriveStyle.ToUpper = "QUICK" Then
  706.                             If PosMaint.IsDualLane Then
  707.                                 UpdatetblRegTimeConcepts(2100, "Drive Breakfast Tender Block 2 Lane", RegInfo.RegisterNumber, 1, 0)
  708.                                 UpdatetblRegTimeConcepts(2201, "Drive Breakfast Tender Block 2 Lane", RegInfo.RegisterNumber, 2, 0)
  709.                             Else
  710.                                 UpdatetblRegTimeConcepts(2000, "Drive Breakfast Tender Block 1 Lane", RegInfo.RegisterNumber, 1, 0)
  711.                                 UpdatetblRegTimeConcepts(2201, "Drive Breakfast Tender Block 1 Lane", RegInfo.RegisterNumber, 2, 0)
  712.                             End If
  713.                         Else
  714.                             If PosMaint.IsDualLane Then
  715.                                 UpdatetblRegTimeConcepts(37, "Drive Breakfast Tender", RegInfo.RegisterNumber, 1, 0)
  716.                                 UpdatetblRegTimeConcepts(38, "Drive Lunch Tender", RegInfo.RegisterNumber, 2, 0)
  717.                                 UpdatetblRegTimeConcepts(39, "Drive Breakfast Tender Down", RegInfo.RegisterNumber, 3, 0)
  718.                                 UpdatetblRegTimeConcepts(37, "Drive Breakfast Tender Up", RegInfo.RegisterNumber, 4, 0)
  719.                                 UpdatetblRegTimeConcepts(39, "Drive Lunch Tender Down", RegInfo.RegisterNumber, 5, 0)
  720.                                 UpdatetblRegTimeConcepts(38, "Drive Lunch Tender Up", RegInfo.RegisterNumber, 6, 0)
  721.                                 UpdatetblRegTimeConcepts(39, "Drive Dinner Tender Down", RegInfo.RegisterNumber, 7, 0)
  722.                                 UpdatetblRegTimeConcepts(38, "Drive Dinner Tender Up", RegInfo.RegisterNumber, 8, 0)
  723.                             Else
  724.                                 UpdatetblRegTimeConcepts(27, "Drive Breakfast Tender", RegInfo.RegisterNumber, 1, 0)
  725.                                 'PE 6/7/2022
  726.                                 'Concept 27 is Breakfast, 28 is Lunch, and 29 is Down
  727.                                 'So for Fast Drive Style the default for period 2 is 29 (Down)
  728.                                 If PosMaint.DriveStyle.ToUpper = "FAST" Then
  729.                                     UpdatetblRegTimeConcepts(29, "Down Style Fast Tender", RegInfo.RegisterNumber, 2, 0)
  730.                                 Else
  731.                                     UpdatetblRegTimeConcepts(28, "Drive Lunch Tender", RegInfo.RegisterNumber, 2, 0)
  732.                                 End If
  733.                                 UpdatetblRegTimeConcepts(29, "Drive Breakfast Tender Down", RegInfo.RegisterNumber, 3, 0)
  734.                                 UpdatetblRegTimeConcepts(27, "Drive Breakfast Tender Up", RegInfo.RegisterNumber, 4, 0)
  735.                                 UpdatetblRegTimeConcepts(29, "Drive Lunch Tender Down", RegInfo.RegisterNumber, 5, 0)
  736.                                 UpdatetblRegTimeConcepts(28, "Drive Lunch Tender Up", RegInfo.RegisterNumber, 6, 0)
  737.                                 UpdatetblRegTimeConcepts(29, "Drive Dinner Tender Down", RegInfo.RegisterNumber, 7, 0)
  738.                                 UpdatetblRegTimeConcepts(28, "Drive Dinner Tender Up", RegInfo.RegisterNumber, 8, 0)
  739.                             End If
  740.                         End If
  741.                     Case eDefaultConcept.DualLane1
  742.                         If PosMaint.DriveStyle.ToUpper = "QUICK" Then
  743.                             UpdatetblRegTimeConcepts(1020, "DL Drive Order Taker Breakfast Lane 1", RegInfo.RegisterNumber, 1, 0)
  744.                             UpdatetblRegTimeConcepts(1021, "DL Drive Order Taker Lunch     Lane 1", RegInfo.RegisterNumber, 2, 0)
  745.                         Else
  746.                             UpdatetblRegTimeConcepts(30, "Drive Order Taker Breakfast Lane 1", RegInfo.RegisterNumber, 1, 0)
  747.                             UpdatetblRegTimeConcepts(31, "Drive Order Taker Lunch     Lane 1", RegInfo.RegisterNumber, 2, 0)
  748.                         End If
  749.                     Case eDefaultConcept.DualLane2
  750.                         If PosMaint.DriveStyle.ToUpper = "QUICK" Then
  751.                             UpdatetblRegTimeConcepts(1030, "DL Drive Order Taker Breakfast Lane 2", RegInfo.RegisterNumber, 1, 0)
  752.                             UpdatetblRegTimeConcepts(1031, "DL Drive Order Taker Lunch     Lane 2", RegInfo.RegisterNumber, 2, 0)
  753.                         Else
  754.                             'PE 6/6/2022
  755.                             'If drive style is fast then set cashier mode for breakfast
  756.                             If PosMaint.DriveStyle.ToUpper = "FAST" Then
  757.                                 UpdatetblRegTimeConcepts(52, "Drive Order Taker Breakfast Lane 2 (Fast) Cashier", RegInfo.RegisterNumber, 1, 0)
  758.                                 UpdatetblRegTimeConcepts(53, "Drive Order Taker Lunch     Lane 2 (Fast)", RegInfo.RegisterNumber, 2, 0)
  759.                             Else
  760.                                 UpdatetblRegTimeConcepts(32, "Drive Order Taker Breakfast Lane 2", RegInfo.RegisterNumber, 1, 0)
  761.                                 UpdatetblRegTimeConcepts(33, "Drive Order Taker Lunch     Lane 2", RegInfo.RegisterNumber, 2, 0)
  762.                             End If
  763.                         End If
  764.                 End Select
  765.                 Sleep(10)
  766.             Next
  767.             dt.UpdateData()
  768.             '***************************************************************************************************************************************
  769.         End Using
  770.         DispThis("      Updating Spec Coffee Breakfast Combo" & NewLine)
  771.         FixSCBBreakfastCombo()
  772.     End Sub
  773.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement