Sign in to follow this  
Alpha_ProgDes

I'm having a brainfart with an if-then statement

Recommended Posts

pseudocode:
if customername passed by another control = empty
  if customername from db = empty
    save file as is
  else
    save file with customername
else
    save file with customername
is there a way i can collapse the "save file with customername" into one statement as opposed to two?

Share this post


Link to post
Share on other sites

if customername passed by another control = empty && customername from db = empty
save file as is
else
save file with customername

Share this post


Link to post
Share on other sites
if ( customername passed by another control = empty ) && ( customername from db = empty )
save file as is
else
save file with customername

That is the most obvious way I can see.

Edit: beaten.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this