Пример #1
0
        /// <summary>件数取得</summary>
        async private void button1_Click(object sender, RoutedEventArgs e)
        {
            // 引数1:コンテキスト
            string context = "User1";

            // 引数2:アクションタイプ
            string actionType =
                ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value;

            // Soap & Bean の個別WebメソッドのWeb参照
            SbServiceReference.ServiceForSbSoapClient client = new SbServiceReference.ServiceForSbSoapClient();

            // 非同期呼出しを行う
            SbServiceReference.SelectCountResponse response = await client.SelectCountAsync(context, actionType);

            if (response.Body.SelectCountResult != "")
            {
                // 例外発生時
                WSErrorInfo wse = new WSErrorInfo(response.Body.SelectCountResult);
                this.labelMessage.Text = response.Body.SelectCountResult + " , " + response.Body.returnValue + " , " + wse.MessageID + " , " + wse.Message + " , " + wse.Information;
            }
            else
            {
                // 結果(正常系)
                this.labelMessage.Text = response.Body.returnValue + "件のデータがあります";
            }
        }
Пример #2
0
        /// <summary>件数取得</summary>
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            // 引数1:コンテキスト
            string context = "User1";

            // 引数2:アクションタイプ
            string actionType =
                ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value;

            // Soap & Bean の個別WebメソッドのWeb参照
            SbServiceReference.ServiceForSbSoapClient client
                = new SbServiceReference.ServiceForSbSoapClient();

            // 呼び出しが完了した場合のイベントハンドラを設定する。
            client.SelectCountCompleted += new EventHandler <SbServiceReference.SelectCountCompletedEventArgs>(client_SelectCount_CallCompleted);
            // 非同期呼出しを行う(Silverlightは非同期呼び出しのみサポートする)。
            client.SelectCountAsync(context, actionType);
        }
Пример #3
0
        /// <summary>件数取得</summary>
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            // 引数1:コンテキスト
            string context = "User1";

            // 引数2:アクションタイプ
            string actionType =
                ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value;

            // Soap & Bean の個別WebメソッドのWeb参照
            SbServiceReference.ServiceForSbSoapClient client
                = new SbServiceReference.ServiceForSbSoapClient();

            // 呼び出しが完了した場合のイベントハンドラを設定する。
            client.SelectCountCompleted += new EventHandler<SbServiceReference.SelectCountCompletedEventArgs>(client_SelectCount_CallCompleted);
            // 非同期呼出しを行う(Silverlightは非同期呼び出しのみサポートする)。
            client.SelectCountAsync(context, actionType);
        }
        /// <summary>件数取得</summary>
        async private void button1_Click(object sender, RoutedEventArgs e)
        {
            // 引数1:コンテキスト
            string context = "User1";

            // 引数2:アクションタイプ
            string actionType =
                ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value;

            // Soap & Bean の個別WebメソッドのWeb参照
            SbServiceReference.ServiceForSbSoapClient client = new SbServiceReference.ServiceForSbSoapClient();

            // 非同期呼出しを行う
            SbServiceReference.SelectCountResponse response = await client.SelectCountAsync(context, actionType);

            if (response.Body.SelectCountResult != "")
            {
                // 例外発生時
                WSErrorInfo wse = new WSErrorInfo(response.Body.SelectCountResult);
                this.labelMessage.Text = response.Body.SelectCountResult + " , " + response.Body.returnValue + " , " + wse.MessageID + " , " + wse.Message + " , " + wse.Information;
            }
            else
            {
                // 結果(正常系)
                this.labelMessage.Text = response.Body.returnValue + "件のデータがあります";
            }
        }