private void SaveButton_Click(object sender, EventArgs e) { RegisterPerson p = new RegisterPerson(); p.Firstname = FirstnameTextbox.Text; p.LastName = LastnameTextbox.Text; p.Address = StreetnameTextbox.Text; p.MailingAddress = Convert.ToInt32(MailingAddressTextbox.Text); p.PhoneNumber = PhonenumberTextbox.Text; p.Mail = MailingAddressTextbox.Text; }
public async Task <Person> Register(RegisterPerson registerPerson) { var request = new RestRequest("people") { Method = Method.POST }; request.JsonSerializer = new CustomJsonSerializer(); request.AddJsonBody(registerPerson); return(await RestCall <Person>(request)); }