internal void SaveAccount(int id, string fullName, string email, string password, string userType, account cont) { if (fullName == "" || fullName == null || email == "" || email == null || password == "" || password == null || userType == "" || userType == null) { HotelEntities context = new HotelEntities(); if (id == -1) { context.AddAccount(email, fullName, password, userType); context.SaveChanges(); } else { context.ModifyAccount(id, email, fullName, password, userType); context.SaveChanges(); } MainViewModel.Instance.ActiveScreen = new AccountsViewModel(cont); } else { MessageBox.Show("Complete all fields!"); } }