/// <summary> /// Handles the Click event of the btnGetAdTypes control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> /// instance containing the event data.</param> private void btnGetAdTypes_Click(object sender, EventArgs e) { IWcfService service = new WcfServiceClient(); AdType[] adTypes = service.GetAdTypes(); StringBuilder builder = new StringBuilder(); foreach (AdType adType in adTypes) { builder.AppendFormat("Ad type name is '{0}' and id is {1}.\n", adType.idField, adType.nameField); } MessageBox.Show(builder.ToString()); }
/// <summary> /// Handles the Click event of the btnGetAdTypes control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> /// instance containing the event data.</param> private void btnGetAdTypes_Click(object sender, EventArgs e) { IWcfService service = new WcfServiceClient(); AdType[] adTypes = service.GetAdTypes(); StringBuilder builder = new StringBuilder(); foreach (AdType adType in adTypes) { builder.AppendFormat("Ad type name is '{0}' and id is {1}.\n", adType.nameField, adType.idField); } MessageBox.Show(builder.ToString()); }