public void SignUp() { try { if (PersonId == null || FirstName == null || LastName == null || PhoneNumber == null || MailAddress == null || City == null || StreetName == null || buildingNumber == null) { throw new Exception("אנא מלא את כל השדות"); } Recipient recipient = new Recipient(personId, FirstName, LastName, PhoneNumber, MailAddress, new Address(City, StreetName, int.Parse(BuildingNumber))); AddRecipientM.SignUp(recipient); Message = new Message("איזה כיף!", "הנמען נוסף בהצלחה", true, false); } catch (Exception e) { Message = new Message("משהו השתבש.", e.Message, false, true); } }
public AddRecipientVM() { AddRecipientM = new AddRecipientM(); }