Why else statement for function userexiststoday not work and how to solve it

Posted by Ahmedsa under C# on 2/22/2017 | Points: 10 | Views : 991 | Status : [Member] | Replies : 1
I work in c# windows form vs 2015 selecting data from excel
problem i face it
supose i have in excel file
user id dateprint
1001 22/02/2017

if try add this user 1001 again with date 23/02/2017
it must give me message this user found before
but this is not happen and this is actually my problem
my code


bool c = QRC.UserExists(textBox1.Text);  

bool b = UserExistsToday();

if (c == true)

{

if (b == true)

{


label8.Text = "User added today";



}


else

{


label8.Text = "User added before";


}





Responses

Posted by: Rajnilari2015 on: 2/23/2017 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
check for the value of c

if (c == true) 


--
Thanks & Regards,
RNA Team

Ahmedsa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response