Escolar Documentos
Profissional Documentos
Cultura Documentos
DataGridView1.DataSource = DtSet.Tables(0)
MyConnection.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Function Resigned_Upload() As Boolean
Dim I As Int32 = 0
Dim SUCC As Int32 = 0
Dim sql As New SQLTransactions.sqltransactions
For I = 0 To DataGridView1.Rows.Count - 2
If
SUCC1 = SUCC + 1
Succ1 = success & “ “ & DataGridView1.Rows(I).Cells(0).Value
End If
Else
failed = failed & " " &
DataGridView1.Rows(I).Cells(0).Value
End If
End If
Next
MsgBox("Resigns- Upload Completed " & vbCr & "Successful : " &
SUCC & vbCr & "Failed : " & failed)
End Function
Function Transfer_Upload() As Boolean
Dim I As Int32 = 0
Dim SUCC As Int32 = 0
Dim sql As New SQLTransactions.sqltransactions
For I = 0 To DataGridView1.Rows.Count - 2
If DataGridView1.Rows(I).Cells(0).Value.ToString <> "" Then
If sql.nonqry("insert into
tbltransfer(Dt,EmpId,UserId,EmpName,StoreFrom,StoreTo,Remarks,DoneBy)
values('" + Now.Date + "'," & DataGridView1.Rows(I).Cells(0).Value & ","
& DataGridView1.Rows(I).Cells(0).Value & ", '','',' " +
DataGridView1.Rows(I).Cells(2).Value + "',' " +
DataGridView1.Rows(I).Cells(3).Value + "','" +
SQLTransactions.sqltransactions.user + "') ") = True Then
If sql.nonqry("Update Employee set Location='" +
DataGridView1.Rows(I).Cells(2).Value + "' where empid=" &
DataGridView1.Rows(I).Cells(0).Value) = True Then
SUCC1 = SUCC + 1
End If
Else
failed = failed & " " &
DataGridView1.Rows(I).Cells(0).Value
End If
End If
Next
MsgBox("Transfers- Upload Completed " & vbCr & "Successful : " &
SUCC & vbCr & "Failed : " & failed)
End Function
'employee data upload...............
SUCC = SUCC + 1
Else
failed = failed & " " &
DataGridView1.Rows(I).Cells(0).Value
End If
End If
Next
MsgBox("Transfers- Upload Completed " & vbCr & "Successful : " &
SUCC & vbCr & "Failed : " & failed)
End Function
tmp = check(DataGridView1.Columns(2).HeaderText,
"TLOCATION")
If tmp = False Then
Return False
End If
End If
Return True
End Function
Function check(ByVal v1 As String, ByVal v2 As String) As Boolean
If v1 = v2 Then
check = True
Else
check = False
End If
End Function
Function upload_employee()
upload_employee = ""
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
selec = RadioButton1.Text
End Sub
Dim failed As String = ""
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
failed = ""
If valida(selec) Then
End If
End Sub
End Class