VB.net LIST VIEW需要帮助

时间:2015-03-12 16:58:19

标签: vb.net listview

this is not my image but similar to what im trying to achieve.好吧,所以基本上对于我的大学A2我一直在为纹身店创建预订系统,这是预约约会。我离开了最烦人的部分(不知道)直到最后,时间到了

这些是我的sql表:

预约:

| id | tattooId |日期|时间|长度|

纹身:

| id | customerID | staffID |描述|

客户:

| id |名字|电子邮件|地址|

人员:

| id |名称|姓|电子邮件|

在我的表格中我有“添加约会”,我在所选日期拉出所选职员的所有约会,然后在所选日期添加“新约会”,这样我就可以轻松防止和冲突,并保存到桌子。

我现在要做的是创建约会风格视图,使用“listview”,第一列代表时间,其余的是员工

|time| bob | james | billy|
 ---------------------------
|0800|     |       |      |
|0830|frank|       |      |
|0900|     | james |      |
|0930|     |       |      |
|1000|     |       |      |

它会看起来像这样,因为当我添加约会时我会检查冲突我现在不需要担心

我只需要拉出所有约会并以某种方式将它们排列在表格中

我有一个小型的工作版本,但如果有人可以提供帮助,我会感到非常感激。

    'the columns, tmstr(0) is time column,tmstr(1) is a staff member.
    Dim tmpstr(1) As String
    Dim TempNode As ListViewItem

    ' first column(time column)' 
    For i = 900 To 1700 Step 50
        If i Mod 100 = 50 Then
            tmpstr(0) = i - 20
        Else
            tmpstr(0) = i
        End If

        If i = "1100" Then tmpstr(1) = "appointment, james" Else tmpstr(1) = ""
        TempNode = New ListViewItem(tmpstr)
        ListView1.Items.Add(TempNode)

    Next

0 个答案:

没有答案
相关问题