// // AUTH // /// <summary> /// Returns wether a user with the given username and password exists or not and /// informs the required modules about the result. /// </summary> /// <param name="username"></param> /// <param name="password"></param> /// <returns></returns> public bool AuthUser(String username, String password) { bool ret = false; user = synchMng.TryLogin(username, password); workLocations = synchMng.GetFilteredLocations(true); ret = (user != null); if (ret) { MessagingCenter.Send <AppCore, List <Location> >(this, "ChooseWorkLocation", workLocations); MessagingCenter.Send <AppCore, Role>(this, "Auth", user.Role); } return(ret); }