public bool CheckLogin(string pIdOrUsername, string pPassword) { bool ok = PosService.IsUser(pIdOrUsername, pPassword, ref errorString); if (ok == true) { Username = pIdOrUsername; Password = pPassword; users = GetByIdOrUsername(pIdOrUsername); } return(ok); }