public void SaveCustomer() { Customer customer = new Customer(); customer.Name = txtName.Text; customer.PostalCode = txtPostal.Text; customer.Phone = txtPhone.Text; customer.Address = txtAddress.Text; customer.IdOccupation = Convert.ToInt32(cmbJobTitle.SelectedValue); customer.IdEducation = Convert.ToInt32(cmbEducation.SelectedValue); customer.IdSuburb = Convert.ToInt32(cmbSuburb.SelectedValue); { Occupation occupation = new Occupation(); occupation.Description = cmbJobTitle.Text; Education education = new Education(); education.Name = cmbEducation.Text; Suburb suburb = new Suburb(); suburb.Name = cmbSuburb.Text; customer.educ = education; customer.oc = occupation; customer.sub = suburb; } logic.SaveCustomer(customer); }
public void InsertCustomer(Customer customer) { GetDataLogic logic = new GetDataLogic(); logic.SaveCustomer(customer); }