示例#1
0
        /// <summary>更新処理</summary>
        /// <param name="rcFxEventArgs">イベントハンドラの共通引数</param>
        protected void UOC_btnButton8_Click(RcFxEventArgs rcFxEventArgs)
        {
            // 引数クラスを生成
            // 下位(B・D層)は、テスト クラスを流用する
            TestParameterValue testParameterValue
                = new TestParameterValue(
                      this.Name, rcFxEventArgs.ControlName, "Update",
                      ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value,
                      MyBaseControllerWin.UserInfo);

            // 情報の設定
            testParameterValue.ShipperID   = int.Parse(this.textBox1.Text);
            testParameterValue.CompanyName = this.textBox2.Text;
            testParameterValue.Phone       = this.textBox3.Text;

            // 戻り値
            TestReturnValue testReturnValue;

            // 分離レベルの設定
            DbEnum.IsolationLevelEnum iso = this.SelectIsolationLevel();

            // B層呼出し+都度コミット
            LayerB layerB = new LayerB();

            testReturnValue = (TestReturnValue)layerB.DoBusinessLogic(testParameterValue, iso);
            LayerB.CommitAndClose();

            // 結果表示するメッセージ エリア
            this.labelMessage.Text = "";

            if (testReturnValue.ErrorFlag == true)
            {
                // 結果(業務続行可能なエラー)
                labelMessage.Text  = "ErrorMessageID:" + testReturnValue.ErrorMessageID + "\r\n";
                labelMessage.Text += "ErrorMessage:" + testReturnValue.ErrorMessage + "\r\n";
                labelMessage.Text += "ErrorInfo:" + testReturnValue.ErrorInfo + "\r\n";
            }
            else
            {
                // 結果(正常系)
                labelMessage.Text = testReturnValue.Obj.ToString() + "件更新";
            }
        }
示例#2
0
        /// <summary>参照処理</summary>
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            // 引数クラスを生成
            // 下位(B・D層)は、テスト クラスを流用する
            TestParameterValue testParameterValue
                = new TestParameterValue(
                      this.Name, ((Button)sender).Name, "Select",
                      ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value,
                      this.myUserInfo);

            // 情報の設定
            testParameterValue.ShipperID = int.Parse(this.textBox1.Text);

            // 戻り値
            TestReturnValue testReturnValue;

            // 分離レベルの設定
            DbEnum.IsolationLevelEnum iso = this.SelectIsolationLevel();

            // B層呼出し+都度コミット
            LayerB layerB = new LayerB();

            testReturnValue = (TestReturnValue)layerB.DoBusinessLogic(testParameterValue, iso);
            LayerB.CommitAndClose();

            // 結果表示するメッセージ エリア
            this.labelMessage.Content = "";

            if (testReturnValue.ErrorFlag == true)
            {
                // 結果(業務続行可能なエラー)
                labelMessage.Content  = "ErrorMessageID:" + testReturnValue.ErrorMessageID + "\r\n";
                labelMessage.Content += "ErrorMessage:" + testReturnValue.ErrorMessage + "\r\n";
                labelMessage.Content += "ErrorInfo:" + testReturnValue.ErrorInfo + "\r\n";
            }
            else
            {
                // 結果(正常系)
                this.textBox1.Text = testReturnValue.ShipperID.ToString();
                this.textBox2.Text = testReturnValue.CompanyName;
                this.textBox3.Text = testReturnValue.Phone;
            }
        }
示例#3
0
        /// <summary>一覧取得(動的sql)</summary>
        private void button5_Click(object sender, RoutedEventArgs e)
        {
            // 引数クラスを生成
            // 下位(B・D層)は、テスト クラスを流用する
            TestParameterValue testParameterValue
                = new TestParameterValue(
                      this.Name, ((Button)sender).Name, "SelectAll_DSQL",
                      ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value,
                      this.myUserInfo);

            // 動的SQLの要素を設定
            testParameterValue.OrderColumn   = ((ComboBoxItem)this.ddlOrderColumn.SelectedItem).Value;
            testParameterValue.OrderSequence = ((ComboBoxItem)this.ddlOrderSequence.SelectedItem).Value;

            // 戻り値
            TestReturnValue testReturnValue;

            // 分離レベルの設定
            DbEnum.IsolationLevelEnum iso = this.SelectIsolationLevel();

            // B層呼出し+都度コミット
            LayerB layerB = new LayerB();

            testReturnValue = (TestReturnValue)layerB.DoBusinessLogic(testParameterValue, iso);
            LayerB.CommitAndClose();

            // 結果表示するメッセージ エリア
            this.labelMessage.Content = "";

            if (testReturnValue.ErrorFlag == true)
            {
                // 結果(業務続行可能なエラー)
                labelMessage.Content  = "ErrorMessageID:" + testReturnValue.ErrorMessageID + "\r\n";
                labelMessage.Content += "ErrorMessage:" + testReturnValue.ErrorMessage + "\r\n";
                labelMessage.Content += "ErrorInfo:" + testReturnValue.ErrorInfo + "\r\n";
            }
            else
            {
                // 結果(正常系)
                this.dataGridControl1.Columns.Clear();
                this.dataGridControl1.DataContext = testReturnValue.Obj;
            }
        }
示例#4
0
        /// <summary>一覧取得(動的sql)</summary>
        /// <param name="rcFxEventArgs">イベントハンドラの共通引数</param>
        protected void UOC_btnButton5_Click(RcFxEventArgs rcFxEventArgs)
        {
            // 引数クラスを生成
            // 下位(B・D層)は、テスト クラスを流用する
            TestParameterValue testParameterValue
                = new TestParameterValue(
                      this.Name, rcFxEventArgs.ControlName, "SelectAll_DSQL",
                      ((ComboBoxItem)this.ddlDap.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode1.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlMode2.SelectedItem).Value + "%"
                      + ((ComboBoxItem)this.ddlExRollback.SelectedItem).Value,
                      MyBaseControllerWin.UserInfo);

            // 動的SQLの要素を設定
            testParameterValue.OrderColumn   = ((ComboBoxItem)this.ddlOrderColumn.SelectedItem).Value;
            testParameterValue.OrderSequence = ((ComboBoxItem)this.ddlOrderSequence.SelectedItem).Value;

            // 戻り値
            TestReturnValue testReturnValue;

            // 分離レベルの設定
            DbEnum.IsolationLevelEnum iso = this.SelectIsolationLevel();

            // B層呼出し+都度コミット
            LayerB layerB = new LayerB();

            testReturnValue = (TestReturnValue)layerB.DoBusinessLogic(testParameterValue, iso);
            LayerB.CommitAndClose();

            // 結果表示するメッセージ エリア
            this.labelMessage.Text = "";

            if (testReturnValue.ErrorFlag == true)
            {
                // 結果(業務続行可能なエラー)
                labelMessage.Text  = "ErrorMessageID:" + testReturnValue.ErrorMessageID + "\r\n";
                labelMessage.Text += "ErrorMessage:" + testReturnValue.ErrorMessage + "\r\n";
                labelMessage.Text += "ErrorInfo:" + testReturnValue.ErrorInfo + "\r\n";
            }
            else
            {
                // 結果(正常系)
                this.dataGridView1.DataSource = testReturnValue.Obj;
            }
        }