|
|
|
|
@ -8,17 +8,16 @@ using System.Threading;
|
|
|
|
|
|
|
|
|
|
namespace Gremlin.MVVM
|
|
|
|
|
{
|
|
|
|
|
public class ContactViewModel : PropertyChangedBase, IHandle<ShellViewModel>
|
|
|
|
|
public class ContactViewModel : PropertyChangedBase
|
|
|
|
|
{
|
|
|
|
|
private byte _gender;
|
|
|
|
|
private string _firstName;
|
|
|
|
|
private string _lastName;
|
|
|
|
|
private string _eMail;
|
|
|
|
|
private string _accountName;
|
|
|
|
|
private string _accountStreet;
|
|
|
|
|
private uint _accountZIP;
|
|
|
|
|
private string _accountCity;
|
|
|
|
|
//private IEventAggregator _eventAggregator;
|
|
|
|
|
private byte _gender = 1;
|
|
|
|
|
private string _firstName = "firstName";
|
|
|
|
|
private string _lastName = "lastName";
|
|
|
|
|
private string _eMail = "email@email.de";
|
|
|
|
|
private string _accountName = "accountName";
|
|
|
|
|
private string _accountStreet = "accountStreet";
|
|
|
|
|
private uint _accountZIP = 0;
|
|
|
|
|
private string _accountCity = "accountCity";
|
|
|
|
|
|
|
|
|
|
public byte Gender { get => _gender; internal set { _gender = value; NotifyOfPropertyChange(() => Gender); } }
|
|
|
|
|
public string FirstName { get => _firstName; internal set { _firstName = value; NotifyOfPropertyChange(() => FirstName); } }
|
|
|
|
|
@ -29,10 +28,7 @@ namespace Gremlin.MVVM
|
|
|
|
|
public uint AccountZIP { get => _accountZIP; internal set { _accountZIP = value; NotifyOfPropertyChange(() => AccountZIP); } }
|
|
|
|
|
public string AccountCity { get => _accountCity; internal set { _accountCity = value; NotifyOfPropertyChange(() => AccountCity); } }
|
|
|
|
|
|
|
|
|
|
//public ContactViewModel(IEventAggregator eventAggregator)
|
|
|
|
|
//{
|
|
|
|
|
// _eventAggregator = eventAggregator;
|
|
|
|
|
//}
|
|
|
|
|
public ContactViewModel() { }
|
|
|
|
|
|
|
|
|
|
public ContactViewModel(byte gender, string firstName, string lastName, string eMail, string accountName, string accountStreet, uint accountZIP, string accountCity)
|
|
|
|
|
{
|
|
|
|
|
@ -46,10 +42,6 @@ namespace Gremlin.MVVM
|
|
|
|
|
AccountCity = accountCity ?? throw new ArgumentNullException(nameof(accountCity));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContactViewModel()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static ContactViewModel ConvertObjectToContactVM(object selectedItem)
|
|
|
|
|
{
|
|
|
|
|
ContactViewModel selectedContact = new();
|
|
|
|
|
|