private void BtnGetNotificationPreferences_Click(object sender, System.EventArgs e) { try { TxtStatus.Text = ""; TxtDelivery.Text = ""; LstPreferences.Items.Clear(); GetNotificationPreferencesCall apicall = new GetNotificationPreferencesCall(Context); apicall.GetNotificationPreferences((NotificationRoleCodeType)Enum.Parse(typeof(NotificationRoleCodeType), CboRole.SelectedItem.ToString())); if (apicall.ApplicationDeliveryPreferences != null) { TxtStatus.Text = apicall.ApplicationDeliveryPreferences.ApplicationEnable.ToString(); TxtDelivery.Text = apicall.ApplicationDeliveryPreferences.ApplicationURL; } foreach (NotificationEnableType notify in apicall.UserDeliveryPreferenceList) { string[] listparams = new string[7]; listparams[0] = notify.EventType.ToString(); listparams[1] = notify.EventEnable.ToString(); ListViewItem vi = new ListViewItem(listparams); LstPreferences.Items.Add(vi); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void GetNotificationPreferences() { GetNotificationPreferencesCall api = new GetNotificationPreferencesCall(this.apiContext); // Make API call. api.Execute(); // Save result. TestData.NotificationPreferencesResponse = (GetNotificationPreferencesResponseType)api.ApiResponse; }
public SetupController(eBayApi api) { context = api.GetContext(); getNotificationPreferences = new GetNotificationPreferencesCall(context); getNotificationPreferences.PreferenceLevel = eBay.Service.Core.Soap.NotificationRoleCodeType.User; asyncRequest = new Task(getNotificationPreferences.Execute); asyncRequest.Start(); }
public IHttpActionResult GetNotificationPreferences() { try { apiContext = GetApiContext(); GetNotificationPreferencesCall call = new GetNotificationPreferencesCall(apiContext); call.GetNotificationPreferences(NotificationRoleCodeType.Application); return(Ok()); } catch (Exception ex) { throw ex; } }