protected void btnAddOffice2_Click(object sender, EventArgs e) { setAttributes(); ServiceReference1.Service1Client x = new ServiceReference1.Service1Client(); ServiceReference1.CompositeOffice office = new ServiceReference1.CompositeOffice(); office.Adress = Address; office.City = City; int CID = Convert.ToInt32(ddlCountry.SelectedValue); //office.Country = ddlCountry.SelectedItem; int n; bool r = int.TryParse(OrgNumber, out n); office.OrgNumber = n; int n2; bool r2 = int.TryParse(ZipCode, out n2); office.ZipCode = n2; office.Name = OfficeName; office.CID = CID; x.SaveOffice(office); buttonsAddOffice2(); setFieldsEnabled(false); updateGW(); resetFields(); }