Bonjour,
j'obtiens cette erreur :voici le code :La référence d'objet n'est pas définie à une instance d'un objet.
EndUser : classe utilisateur
Address : class address
Merci de m'aider
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 EndUser enduser = new EndUser(); if (IsValid) { enduser.EndUserTypeID = (int) Enums.EndUserType.CUSTOMER; enduser.FirstName = textFirstname.Text; enduser.LastName = textLastname.Text; ==> enduser.Address.AddressLine = textAddress.Text ; enduser.Address.AddressLine2 = textAddress2.Text; enduser.Address.City = textCity.Text; enduser.Address.State = textState.Text; enduser.Address.PostalCode = textPostalCode.Text; enduser.Password = textPassword.Text; enduser.ContactInformation.Email = textEmail.Text; enduser.ContactInformation.Phone = textPhone.Text; enduser.ContactInformation.Phone2 = textPhone2.Text; enduser.ContactInformation.Fax = textFax.Text; enduser.IsSubscribed = checkboxNewsletter.Checked;
Partager