private bool Check_login(RegistrationModel model) { if (Query.CheckUser(model.Username) > 0) { MessageBox.Show("Username is taken, please change it ", "FoodDiary", MessageBoxButton.OK, MessageBoxImage.Information); return(false); } return(true); }