Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- myconnection.OPEN();
- cmd = NEW SqlCommand("select count(*) from Avtori where Username=@emp_ID and Password=@password", myconnection);
- cmd.Parameters.AddWithValue("@emp_ID",usernameTXTBOX);
- cmd.Parameters.AddWithValue("@password",passwordTXTBOX);
- INT COUNT = CONVERT.ToInt32(cmd.ExecuteScalar());
- IF (COUNT == 1 )
- {
- MessageBox.SHOW("Access Granted");
- }
- ELSE
- {
- MessageBox.SHOW("Access denied");
- }
- myconnection.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement