Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

.Net Cobol

$
0
0

How would one do this in Cobol .Net?  My main concern is the IsValidData function.  How would I write that in .net cobol using invoke.  I tried

                   invoke type Validator::IsPresent(txtCode) and

                   invoke type Validator::IsDecimal(txtPrice) returning validData

but there is a syntax error with the 'and'.

 

If isValidData() then

    *Do somthing

end if

 

Public Function IsValidData() as Boolean

    Return Validator.IsPresent(txtCode) andalso

                Validator.IsDecimal(txtPrice)

end function

 

Class - Validator

Public Shared Function IsPresent(textbox as Textbox) as Boolean

        if textbox.text = " " then Messagebox.Show("Error")

         return false

         else

          return true

end function.

 


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>