public void GetStoreOptions() { GetStoreOptionsCall api = new GetStoreOptionsCall(this.apiContext); api.GetStoreOptions(); TestData.StoreOptionsResponse = (GetStoreOptionsResponseType)api.ApiResponse; }
private void BtnGetStoreOptions_Click(object sender, System.EventArgs e) { try { LstBasicThemes.Items.Clear(); LstAdvancedThemes.Items.Clear(); LstLogos.Items.Clear(); LstSubscriptions.Items.Clear(); GetStoreOptionsCall apicall = new GetStoreOptionsCall(Context); apicall.GetStoreOptions(); foreach (StoreThemeType theme in apicall.BasicThemeArray.Theme) { string[] listparams = new string[2]; listparams[0] = theme.ThemeID.ToString(); listparams[1] = theme.Name; ListViewItem vi = new ListViewItem(listparams); LstBasicThemes.Items.Add(vi); } foreach (StoreThemeType theme in apicall.AdvancedThemeArray.Theme) { string[] listparams = new string[2]; listparams[0] = theme.ThemeID.ToString(); listparams[1] = theme.Name; ListViewItem vi = new ListViewItem(listparams); LstAdvancedThemes.Items.Add(vi); } foreach (StoreLogoType logo in apicall.LogoList) { string[] listparams = new string[2]; listparams[0] = logo.LogoID.ToString(); listparams[1] = logo.Name; ListViewItem vi = new ListViewItem(listparams); LstLogos.Items.Add(vi); } foreach (StoreSubscriptionType subs in apicall.SubscriptionList) { string[] listparams = new string[2]; listparams[0] = subs.Level.ToString(); listparams[1] = subs.Fee.Value.ToString(); ListViewItem vi = new ListViewItem(listparams); LstSubscriptions.Items.Add(vi); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }