0

我有一个从生物识别设备中提取日期时间信息的 winform,并以以下格式在未绑定的 datagridview 上显示信息。

S/N        Type    Veri       Name     Datetime
====       ====    ====       ====     ========
1           1       2          emp     2012/12/01 13:00

How can I replace the Type=1 to "In", and Veri=2 to "FP"??  

这是我当前的代码。而且,我合并年/月/日时间的方式是否正确完成?

vRet = Form1.SBXPC1.GetAllGLogData(mMachineNumber, vTMachineNumber, vSEnrollNumber,     vSMachineNumber, vVerifyMode, vYear, vMonth, vDay, vHour, vMinute, vSecond)
            If vRet = False Then Exit Do
            vRet = Form1.SBXPC1.GetUserName1(mMachineNumber, vSEnrollNumber, vName)
            If vRet = True And i <> 1 Then
                DataGridView2.ColumnCount = 7
                DataGridView2.Columns(0).Name = "S/N"
                DataGridView2.Columns(1).Name = "DeviceID"
                DataGridView2.Columns(2).Name = "Enroll"
                DataGridView2.Columns(3).Name = "Name"
                DataGridView2.Columns(4).Name = "DN"
                DataGridView2.Columns(5).Name = "Veri"
                DataGridView2.Columns(6).Name = "Datetime"
            End If
            Dim row As String() = New String() {i, vTMachineNumber, vSEnrollNumber, vName, vSMachineNumber, vVerifyMode, CStr(vYear) & "/" & (vMonth) & "/" & (vDay) & " " & (vHour) & ":" & (vMinute)}
            DataGridView2.Rows.Add(row)
4

1 回答 1

0

如果出现以下情况,我会立即使用:

Dim row As String() = New String() {i, vTMachineNumber, vSEnrollNumber, vName, vSMachineNumber, If(vVerifyMode = 2, "FP", ""), CStr(vYear) & "/" & (vMonth) & "/" & (vDay) & " " & (vHour) & ":" & (vMinute)}
于 2012-12-08T07:20:50.957 回答