Hi, I m looking for someone with knowledge in ASP.net or (PHP?). I represent a nonprofit organization that named Ateljee (http://www.uwkringwinkel.be). We have a small application we use for registration the working hours of our employees. The application (.exe) is only one screen (see picture) with works use to scan a badge with barcode. After scanning, your name & scan time comes on the screen. The information is saved in a MS SQL DB with later export the information to a bigger HR application for further processing. The problem Some of our workers don t work in the building and can t scan. These people have access to the internet, so we were thinking to make a web based variant of the vb.net version we have. I have basic program skills en created the vb.net version myself, but to turn this in ASP.net page doesn t seem to work. Some object events that I use in vb.net don t even exits in ASP.net ( example: Textbox.refresh) Below you find the print screen of the exe and also the code I wrote, first step is to find somebody that want s to do this and that can give me a price. Code of the vb.net version Imports System.Data Imports System.Data.SqlClient Public Class Form1 Dim realbarcode As String Dim extentbc As Integer Dim tellernul As Integer Dim teller As Integer Dim place As String
Dim objconnection3 = New SqlConnection("Server=SRVSQL01;Database=ShopPlusV902;User ID=xxxxx;Password=xxxxxxxx;") other DB that already has the names of the workers, we get here the name to publich on screen Dim objdataadapter As New SqlDataAdapter Dim objdataview As DataView = New DataView Public lastscanlbl As String Public MDWnaam As String Dim objcurrencymanager As CurrencyManager Dim objdataset As DataSet = New DataSet Dim SQLdr As SqlDataReader Dim timeint As Long Dim SQLCmd As New SqlCommand() Public Sub getlastscan() to check if last scan was in or out objconnection2.open() SQLCmd.Connection = objconnection2 SQLCmd.CommandText = "select top 1 MdwID, LogID,lastaction from vw_dagscans where MdwID = " & CInt(Mid(barcode.Text, 3, 11)) & " order by LogID desc" lastscanlbl = (SQLdr("lastaction")) lastscanlbl = "start" objconnection2.close() Public Sub getmdwname() SQLCmd.CommandText = "select top 1 NAAM + ' ' + VOORNAAM as vnaam from KLANTEN where KLANTENKAART = '" & realbarcode & "'" Public Sub invoeren() Select Case lastscanlbl Case "start" lastscanlbl = "stop" Case "stop" lastscanlbl = "start"
Dim objconnection = New SqlConnection("Server=SRV SQL01;Database=scanlog;User ID=xxxxxx;Password=xxxxxxx;") Dim objcommand As SqlCommand = New SqlCommand objcommand.connection = objconnection objcommand.commandtext = "INSERT INTO T_regscans (MdwID, klokdate, lastaction,mdw,locatietxt) VALUES (@MdwID, @datum,@lastin,@mdw,@locatie)" objcommand.parameters.addwithvalue("@mdwid", TextBox1.Text) objcommand.parameters.addwithvalue("@datum", Today) objcommand.parameters.addwithvalue("@lastin", lastscanlbl) objcommand.parameters.addwithvalue("@mdw", MDWnaam) objcommand.parameters.addwithvalue("@locatie", place) objconnection.open() objcommand.executenonquery() objconnection.close() Public Sub If Len(barcode.Text) > 6 Then TextBox1.Text = CInt(Mid(barcode.Text, 3, 11)) getlastscan() Threading.Thread.Sleep(200) invoeren() barcode.refresh() If lastscanlbl = "start" Then lblinfo.forecolor = Color.DarkOrange lblinfo.text = MDWnaam & vbcrlf & "gestopt om " & TimeOfDay lblinfo.forecolor = Color.Black lblinfo.text = MDWnaam & vbcrlf & "gestart om " & TimeOfDay timeint = 0 Private Sub barcode_textchanged(byval sender As Object, ByVal e As System.EventArgs) Handles barcode.textchanged Public Sub SQLCmd.CommandText = "select top 1 NAAM + ' ' + VOORNAAM as vnaam from KLANTEN where KLANTENKAART = '" & barcode.text & "'"
Threading.Thread.Sleep(10) barcode.refresh() Public Sub getbc() Select Case Len(barcode.Text) Case 8 ' some badgecodes are longer that others so I need to make sure That he find the right person. SQLCmd.CommandText = "select top 1 NAAM + ' ' + VOORNAAM as vnaam from KLANTEN where KLANTENKAART = '" & barcode.text & "'" Threading.Thread.Sleep(100) Case 9 SQLCmd.CommandText = "select top 1 NAAM + ' ' + VOORNAAM as vnaam from KLANTEN where KLANTENKAART = '" & barcode.text & "'"
Case 10 Threading.Thread.Sleep(100) SQLCmd.CommandText = "select top 1 NAAM + ' ' + VOORNAAM as vnaam from KLANTEN where KLANTENKAART = '" & barcode.text & "'" Threading.Thread.Sleep(100) barcode.refresh() Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load timeint = 0 lblinfo.enabled = False Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick timeint = timeint + 1 txtklok.text = Now.ToLongTimeString Select Case timeint Case 7 If Then 'getbc()
Case Is > 40 timeint = 0 Private Sub barcode_validated(sender As Object, e As System.EventArgs) Handles barcode.validated Select Case Mid(barcode.Text, 1, 1) some barcodescanners have a prefix letter that refers to a location witch we also save in the DB Case "a" place = "Pannestraat" Case "b" place = "kiekenstraat" Case "c" place = "kammerstraat" Case "d" place = "opgeëistenlaan" Case "e" place = "postje" Case "f" place = "Tarbotstraat DTP" Case "g" place = "oude houtlei" Case place = "intern" Private Sub txttab_gotfocus(sender As Object, e As System.EventArgs) Handles txttab.gotfocus after scanning the focus needs to be set again on the start object ready for next scan. End Class