Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
mescounter = mescounter + 1
Me.txtmescount.Text = 60 - mescounter
If mescounter = 60 Then
processall() ' process all waiting message and e-mails
mescounter = 0
End If
If doweb Then
If curday <> 1 And curday <> 7 Then
If curhour > 7 And curhour < 18 Then
webcounter = webcounter + 1
Me.txtwebcount.Text = 60 - webcounter
If webcounter = 60 Then
processweb() ' exports call data to website
webcounter = 0
End If
Else
webcounter = webcounter + 1
If webcounter = 60 Then
webcounter = 0
End If
Me.txtwebcount.Text = "Paused OOH"
End If
Else
webcounter = webcounter + 1
If webcounter = 60 Then
webcounter = 0
End If
Me.txtwebcount.Text = "Paused W/E"
End If
End If
End Sub
Private Sub processweb()
If processingweb = False Then
processingweb = True
Me.Pbweb.Value = 10
Me.txtwebcall.Text = CStr(CLng(Me.txtwebcall.Text) + upwebsite.getupcalldata())
Me.Pbweb.Value = 20
Me.txtwebcomp.Text = CStr(CLng(Me.txtwebcomp.Text) + upwebsite.getupcompdata())
Me.Pbweb.Value = 50
Me.txtwebemp.Text = CStr(CLng(Me.txtwebemp.Text) + upwebsite.getupempdata())
Me.Pbweb.Value = 70
Me.txtwebcon.Text = CStr(CLng(Me.txtwebcon.Text) + upwebsite.getupcondata())
Me.Pbweb.Value = 90
Me.txtremwebemp.Text = CStr(CLng(Me.txtremwebemp.Text) + upwebsite.getwebchanges())
Me.Pbweb.Value = 100
Me.Pbweb.Value = 0
processingweb = False
End If
End Sub