If txtWeight.Text <> "" Then
If (Val(txtWeight.Text) > Val(txtBalQty.Text)) Then
If Not ((Val(txtWeight.Text) >= (lblMinWeightBundle.Text - 0.01)) And (Val(txtWeight.Text) <= (lblMaxWeightBundle.Text + 0.03))) Then
MsgBox("Bundle Weight should be Minimum :" & (Val(lblMinWeightBundle.Text) - 0.01) & " Ton and Maximum : " & (Val(lblMaxWeightBundle.Text) + 0.03) & " Ton!!!")
txtWeight.Focus()
txtWeight.Text = ""
Else
If (Val(txtWeight.Text) >= (ordqty.text + (ordqty.text / 100) * lblQtyPluse.Text)) Then
MsgBox("Please Enter valid Weight as per the tolerance!!! Max :" & (ordqty.text + (ordqty.text / 100) * lblQtyPluse.Text) & " Ton" & vbCrLf & "Also Check Balance Quantity :" & txtBalQty.Text & "")
txtWeight.Focus()
txtWeight.Text = ""
End If
End If
Else
If Not ((Val(txtWeight.Text) >= (lblMinWeightBundle.Text - 0.01)) And (Val(txtWeight.Text) <= (lblMaxWeightBundle.Text + 0.03))) Then
MsgBox("Bundle Weight should be Minimum :" & (Val(lblMinWeightBundle.Text) - 0.01) & " Ton and Maximum : " & (Val(lblMaxWeightBundle.Text) + 0.03) & " Ton!!!")
txtWeight.Focus()
txtWeight.Text = ""
Else
If (Val(txtWeight.Text) <= (ordqty.text - (ordqty.text / 100) * lblQtyMinus.Text)) Then
MsgBox("Please Enter valid Weight as per the tolerance!!! Min :" & (ordqty.text - (ordqty.text / 100) * lblQtyMinus.Text) & " Ton" & vbCrLf & "Also Check Balance Quantity :" & txtBalQty.Text & "")
txtWeight.Focus()
txtWeight.Text = ""
End If
End If
End If
End If
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
ASKER
my code is working fine, also there is no error.
Only issue is in my logic (which is posted in my question).
In addition, all conditions will be satisfied at a time then and only then net weight is accepted.
Regards,
D Patel