Please tell me how to build Windows form Login .(not ASP.net) . This login Should validate using not only windows Authentication method but also Database user.
How validate User name and password. I used this type of Query for it
SELECT COUNT(*) FROM [Table Name] WHERE UserName = @username AND Password = @password;
If user avalable count >0 Above part handle code side.
using int x = Int32.Parse(commandObject.ExecuteScalar().ToString());
if(x > 0}
**log**
else
**fail**
Please tell me how Can i do it professional and correct way?
