[help] if else elseif逻辑问题。 [英] [help] if else elseif logic problem.

查看:86
本文介绍了[help] if else elseif逻辑问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此时我遇到了问题。我的目标是,当svb.text =更新它应该更新数据..继承人我的代码

I have a problem at this point. My aim is that when the svb.text="Update" it should update the data.. heres my code

If t8.Text < DateTime.Now.ToString("MMMM dd,yyyy") Then
            MsgBox("You cannot assign the burial date because it was already elapsed", MsgBoxStyle.Information, "Cannot be")
            t8.Text = DateTime.Now.ToString("MMMM dd,yyyy")
End If

If CheckBox1.Checked = True Then
     If svb.Text = "SAVE" Then
            If t1.Text.Length = 0 Or t2.Text.Length = 0 Or t3.Text.Length = 0 Or t4.Text.Length = 0 Or _
               t5.Text.Length = 0 Or t6.Text.Length = 0 Or t7.Text.Length = 0 Or t8.Text.Length = 0 Or _
               t9.Text.Length = 0 Or t10.Text.Length = 0 Or t11.Text.Length = 0 Then
                    MsgBox("You cannot add null values", MsgBoxStyle.Information, "Null")
                    Refresh()
            Else
                    roomIsAvailable1()
            End If

     ElseIf svb.Text = "Update" Then
         roomIsAvailable2()
     End If

ElseIf CheckBox1.Checked = False Then
            MsgBox("Reservation cannot be added because the required documents are not present, please check the checkbox if it is already presented", MsgBoxStyle.Exclamation, "Documents not presented")
End If







t8.text是一个datetimepicker,如果日期小于最近的日期,它将显示一个msgbox。

svb是按钮



我尝试了什么:



以前,它工作但是这次......没有任何反应......




t8.text is a datetimepicker where if the date is lesser than the recent date, it will show a msgbox.
svb is the button

What I have tried:

Before, it worked but this time.. nothing happens...

推荐答案

试试这个:



Try this:

If svb.text="Update" Then
   ' Update data
End If


这篇关于[help] if else elseif逻辑问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆