Example #1
0
        /// <summary>更新処理</summary>
        async private void button8_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.UpdateResponse response = await client.UpdateAsync(context, actionType,
                                                                                  new SbServiceReference.Shipper()
            {
                ShipperID = int.Parse(this.textBox1.Text), CompanyName = this.textBox2.Text, Phone = this.textBox3.Text
            });

            if (response.Body.UpdateResult != "")
            {
                // 例外発生時
                WSErrorInfo wse = new WSErrorInfo(response.Body.UpdateResult);
                this.labelMessage.Text = response.Body.UpdateResult + " , " + response.Body.returnValue + " , " + wse.MessageID + " , " + wse.Message + " , " + wse.Information;
            }
            else
            {
                // 結果(正常系)
                this.labelMessage.Text = response.Body.returnValue + "件更新";
            }
        }
Example #2
0
        /// <summary>更新処理</summary>
        private void button8_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.Shipper shipper = new SbServiceReference.Shipper();
            shipper.ShipperID   = int.Parse(this.textBox1.Text);
            shipper.CompanyName = this.textBox2.Text;

            shipper.Phone = this.textBox3.Text;

            // 呼び出しが完了した場合のイベントハンドラを設定する。
            client.UpdateCompleted += new EventHandler <SbServiceReference.UpdateCompletedEventArgs>(client_Update_CallCompleted);
            // 非同期呼出しを行う(Silverlightは非同期呼び出しのみサポートする)。
            client.UpdateAsync(context, actionType, shipper);
        }
Example #3
0
        /// <summary>更新処理</summary>
        private void button8_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.Shipper shipper = new SbServiceReference.Shipper();
            shipper.ShipperID = int.Parse(this.textBox1.Text);
                shipper.CompanyName=this.textBox2.Text;

                shipper.Phone=this.textBox3.Text;

            // 呼び出しが完了した場合のイベントハンドラを設定する。
                client.UpdateCompleted += new EventHandler<SbServiceReference.UpdateCompletedEventArgs>(client_Update_CallCompleted);
            // 非同期呼出しを行う(Silverlightは非同期呼び出しのみサポートする)。
            client.UpdateAsync(context, actionType, shipper);
        }
        /// <summary>更新処理</summary>
        async private void button8_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.UpdateResponse response = await client.UpdateAsync(context, actionType,
                new SbServiceReference.Shipper() { ShipperID = int.Parse(this.textBox1.Text), CompanyName = this.textBox2.Text, Phone = this.textBox3.Text });

            if (response.Body.UpdateResult != "")
            {
                // 例外発生時
                WSErrorInfo wse = new WSErrorInfo(response.Body.UpdateResult);
                this.labelMessage.Text = response.Body.UpdateResult + " , " + response.Body.returnValue + " , " + wse.MessageID + " , " + wse.Message + " , " + wse.Information;
            }
            else
            {
                // 結果(正常系)
                this.labelMessage.Text = response.Body.returnValue + "件更新";
            }
        }