【问题标题】:onpage load check values for same data and display it in one string同一数据的页面加载检查值并将其显示在一个字符串中
【发布时间】:2016-03-21 14:00:27
【问题描述】:

我在 vb.net 中有一个门户网站,其中列出了医生等。现在在我的医生表中,我制作了类似 (slot1MonringFrom、slot1MorningTo、slot1EveningFrom、slot1EveningTo) 的结构,这 4 列仅适用于星期一,现在我有一种所有 7 天的不同列。假设在周一、周三、周四医生填写了相同的时间,然后在页面加载时它应该检查相同的值并将其显示在这样的一个字符串中(周一、周三、周五 - 上午 8 点 - 下午 12 点)。同样的方式 tue, thu 有相同的时间然后它显示在第二个字符串中,如 (tue, thu - 4.00pm - 8.00pm)。

我只想知道如何检查相同的值并将其传递到一个字符串中。如果有任何例子会很好理解..

【问题讨论】:

    标签: asp.net vb.net


    【解决方案1】:

    请尝试如下实现逻辑,

    Dim check1 as boolean = true
    Dim check2 as boolean = true
    Dim check3 as boolean = true
    Dim check4 as boolean = true
    Dim check5 as boolean = true
    Dim check6 as boolean = true
    Dim check7 as boolean = true
    
    
    ''''SLOT 1 CHECKING
    
    check1=false
    'compare slot1 variables with slot2, if matched, 
        'check2=false, contact slot1 and slot2
    
    'compare slot1 variables with slot3, if matched, 
        'check3=false, contact slot1 and slot3
    
    'do same for slot4, slot5, slot6, slot7
    
    ----------
    
    ''''SLOT 2 CHECKING
    
    'if check2=true
        'if check3=false
            'compare slot2 variables with slot3, if matched,
                'check3=false, concate slot2 and slot3
    
        'do same for slot4, slot5, slot6, slot7
    
    --------
    
    ''''SLOT 3 CHECKING
    'if check3=true
    .
    .
    .
    .
    . REPEAT SAME FOR ALL
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多