public bool Logon(string user, string password, ref int userID) { using (SakilaEntities dc = new SakilaEntities()) { var model = from users in dc.staffs where users.first_name.ToUpper() == user.ToUpper() && users.last_name.ToUpper() == password.ToUpper() select users; //check the password if (model.Count() == 1) { userID = Convert.ToInt32(model.ToArray()[0].staff_id); return true; } else { return false; } } }
public bool Logon(string user, string password, ref int userID) { SecurityModule sm = new SecurityModule(); return sm.Logon(user, password, ref userID); }