public void GetNotificationPreferences()
 {
     GetNotificationPreferencesCall api = new GetNotificationPreferencesCall(this.apiContext);
     // Make API call.
     api.Execute();
     // Save result.
     TestData.NotificationPreferencesResponse = (GetNotificationPreferencesResponseType)api.ApiResponse;
 }
		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);
			}

		}