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 IHttpActionResult GetNotificationPreferences() { try { apiContext = GetApiContext(); GetNotificationPreferencesCall call = new GetNotificationPreferencesCall(apiContext); call.GetNotificationPreferences(NotificationRoleCodeType.Application); return(Ok()); } catch (Exception ex) { throw ex; } }