private void button1_Click(object sender, EventArgs e) { admin = new AdminServiceRef.Admin(); string message = ""; int zip; Int32.TryParse(zipTxt.Text, out zip); int streetNr; Int32.TryParse(streetNrTxt.Text,out streetNr); admin.firstName = firstNameTxt.Text; admin.lastName = lastNameTxt.Text; admin.city = cityTxt.Text; admin.zip = zip; admin.street = streetTxt.Text; admin.streetNr = streetNr; admin.phoneNr = phoneTxt.Text; admin.login = usernameTxt.Text; admin.pass = passwordTxt.Text; var client = new AdminServiceRef.AdminServiceClient(); if (client.SaveAdmin(ref admin, ref message)) { Dispose(); } else { new Thread(() => new ErrorWindow(message).ShowDialog()).Start(); } }
private void button1_Click(object sender, EventArgs e) { admin = new AdminServiceRef.Admin(); string message = ""; int zip; Int32.TryParse(zipTxt.Text, out zip); int streetNr; Int32.TryParse(streetNrTxt.Text,out streetNr); admin.firstName = firstNameTxt.Text; admin.lastName = lastNameTxt.Text; admin.city = cityTxt.Text; admin.zip = zip; admin.street = streetTxt.Text; admin.streetNr = streetNr; admin.phoneNr = phoneTxt.Text; admin.login = usernameTxt.Text; admin.pass = passwordTxt.Text; var client = new AdminServiceRef.AdminServiceClient(); client.SaveAdmin(ref admin,ref message); }