Beispiel #1
1
        private Panel CreateElement(DataRow row, FormData formData)
        {
            string tanisoutiCd = (string)row["TaniSochiCd"];
            string tanisoutiName = (string)row["TaniSochiNm"];
            string tanisoutiGrpCd = (string)row["TaniSochiGroupCd"];
            string tanisoutiGrpName = (string)row["TaniSochiGroupNm"];

            return CreateElement(tanisoutiName, tanisoutiCd, tanisoutiGrpCd, formData);
            //return CreateElement(tanisoutiName, tanisoutiCd);
        }
Beispiel #2
0
        public override void SetFormData(FormData data)
        {
            // TODO フォームの作業データを設定する

            // TODO ボタンが押された単位装置のもののみ、設定する
            // TODO スカム厚等
        }
Beispiel #3
0
        public void SetButtonValueCallBack(Button button, string formDatakey, string value, FormData formData)
        {
            button.Click +=
                delegate(object sender, EventArgs e)
                {
                    // TODO 入力済みの単位装置と、別の単位装置が選択された場合は、中分類以降の入力データを一旦無効にする(クリアする)

                    // 画面データの保存は、選択ボタン押下時のみ行う(次へボタン押下の場合は行わない)

                    #region 作業データ保存

                    // ボタン選択値を設定
                    formData.SetValue(formDatakey, value);

                    // TODO 汎用処理にする
                    formData.SetValue(SuishitsuKensaEntryFormData.TANI_SOCHI_NM, ((Button)sender).Text);

                    // 画面の現在入力内容の入力チェック(必要な場合)

                    // 画面の現在入力内容を保存する
                    SetFormData(formData);

                    // TODO 画面作業内容を保存
                    FormManager.GetInstance().SaveFormData(GetType(), formData);

                    #endregion

                    #region 画面遷移

                    ToNextForm();

                    #endregion
                };
        }
Beispiel #4
0
        /// <summary>
        /// OK(登録ボタン用)
        /// </summary>
        public void SetButtonEntryCallBack(Button button, string sochiCd, string sochiNm, TextBox value1, TextBox value2, FormData formData)
        {
            button.Click +=
                delegate(object sender, EventArgs e)
                {
                    // TODO 入力済みの単位装置と、別の単位装置が選択された場合は、中分類以降の入力データを一旦無効にする(クリアする)

                    // 画面データの保存は、選択ボタン押下時のみ行う(次へボタン押下の場合は行わない)

                    #region 作業データ保存

                    // 画面の現在入力内容の入力チェック(必要な場合)

                    // 画面の現在入力内容を保存する
                    // TODO 汎用処理にできるとベター
                    //SetFormData(formData);
                    (formData as SuishitsuKensaEntryFormData).SetTaniSochiScumValue(sochiCd, value1.Text, value2.Text);

                    // 画面作業内容を保存
                    FormManager.GetInstance().SaveFormData(GetType(), formData);

                    // TODO 実際には、DB登録を行うべき

                    #endregion

                    #region 画面遷移

                    // 画面遷移は行わない

                    // TODO メッセージは仮
                    TabMessageBox.Show2(sochiNm + "の登録を行いました。");

                    #endregion
                };
        }
Beispiel #5
0
 public void SaveFormData(Type formType, FormData data)
 {
     // TODO メモリ上の画面入力値を保存する
     if (formDataMap.ContainsKey(formType))
     {
         formDataMap[formType] = data;
     }
     else
     {
         formDataMap.Add(formType, data);
     }
 }
Beispiel #6
-1
        public void SetButtonValueCallBack(Button button, string formDatakey, string value, FormData formData)
        {
            button.Click +=
                delegate(object sender, EventArgs e)
                {
                    #region 作業データ保存

                    // ボタン選択値を設定
                    formData.SetValue(formDatakey, value);

                    // TODO 汎用処理にする
                    formData.SetValue(TeidoSentakuFormData.TANI_SOCHI_KENSA_TEIDO_NM, ((Button)sender).Text);

                    // 画面の現在入力内容の入力チェック(必要な場合)

                    // 画面の現在入力内容を保存する
                    SetFormData(formData);

                    FormManager.GetInstance().SaveFormData(GetType(), formData);

                    #endregion

                    #region 画面遷移

                    //ToNextForm();

                    #endregion
                };
        }
Beispiel #7
-1
        // TODO OKボタンを処理を記述する
        // TODO 装置種別によっては、追加の入力項目が発生する模様?(その場合は、引数を追加する)
        private Panel CreateElement(string taniSoutiName, string taniSoutiCd, string taniSoutiGrpCd, FormData formData)
        {
            #region デザインパラメータ設定

            Panel elementPanel = new Panel();
            Button taniSoutiButton = new Button();
            Panel scumPanel = new Panel();
            TextBox scumFromTextBox = new TextBox();
            TextBox scumToTextBox = new TextBox();
            Label scumLabel = new Label();
            Label scumBetLabel = new Label();
            Button taniSoutiOkButton = new Button();

            //
            // elementPanel
            //
            elementPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
            elementPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            elementPanel.Controls.Add(taniSoutiOkButton);
            elementPanel.Controls.Add(scumPanel);
            elementPanel.Controls.Add(taniSoutiButton);
            elementPanel.Location = new System.Drawing.Point(13, 80);
            elementPanel.MinimumSize = new System.Drawing.Size(550, 100);
            elementPanel.Name = "elementPanel";
            elementPanel.Size = new System.Drawing.Size(700, 135);
            elementPanel.TabIndex = 1;
            //
            // taniSoutiButton
            //
            taniSoutiButton.Anchor = System.Windows.Forms.AnchorStyles.None;
            taniSoutiButton.AutoSize = true;
            taniSoutiButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            taniSoutiButton.Location = new System.Drawing.Point(18, 32);
            taniSoutiButton.Margin = new System.Windows.Forms.Padding(20);
            taniSoutiButton.MinimumSize = new System.Drawing.Size(280, 86);
            taniSoutiButton.Name = "taniSoutiButton";
            taniSoutiButton.Size = new System.Drawing.Size(280, 60);
            taniSoutiButton.TabIndex = 0;
            taniSoutiButton.Text = "嫌気ろ床槽 第1槽";
            taniSoutiButton.UseVisualStyleBackColor = true;
            //
            // scumPanel
            //
            scumPanel.Controls.Add(scumToTextBox);
            scumPanel.Controls.Add(scumFromTextBox);
            scumPanel.Controls.Add(scumBetLabel);
            scumPanel.Controls.Add(scumLabel);
            scumPanel.Location = new System.Drawing.Point(317, 17);
            scumPanel.Name = "scumPanel";
            scumPanel.Size = new System.Drawing.Size(220, 110);
            scumPanel.TabIndex = 1;
            //
            // scumFromTextBox
            //
            scumFromTextBox.Location = new System.Drawing.Point(11, 46);
            scumFromTextBox.Name = "scumFromTextBox";
            scumFromTextBox.Size = new System.Drawing.Size(69, 47);
            scumFromTextBox.TabIndex = 1;
            //
            // scumToTextBox
            //
            scumToTextBox.Location = new System.Drawing.Point(136, 46);
            scumToTextBox.Name = "scumToTextBox";
            scumToTextBox.Size = new System.Drawing.Size(69, 47);
            scumToTextBox.TabIndex = 3;
            //
            // scumLabel
            //
            scumLabel.AutoSize = true;
            scumLabel.Location = new System.Drawing.Point(4, 5);
            scumLabel.Name = "scumLabel";
            scumLabel.Size = new System.Drawing.Size(126, 41);
            scumLabel.TabIndex = 0;
            scumLabel.Text = "スカム厚";
            //
            // scumBetLabel
            //
            scumBetLabel.AutoSize = true;
            scumBetLabel.Location = new System.Drawing.Point(86, 52);
            scumBetLabel.Name = "scumBetLabel";
            scumBetLabel.Size = new System.Drawing.Size(45, 41);
            scumBetLabel.TabIndex = 2;
            scumBetLabel.Text = "~";
            //
            // taniSoutiOkButton
            //
            taniSoutiOkButton.Anchor = System.Windows.Forms.AnchorStyles.None;
            taniSoutiOkButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            taniSoutiOkButton.Location = new System.Drawing.Point(560, 32);
            taniSoutiOkButton.Margin = new System.Windows.Forms.Padding(20);
            taniSoutiOkButton.MinimumSize = new System.Drawing.Size(60, 60);
            taniSoutiOkButton.Name = "taniSoutiOkButton";
            taniSoutiOkButton.Size = new System.Drawing.Size(106, 86);
            taniSoutiOkButton.TabIndex = 2;
            taniSoutiOkButton.Text = "登録";
            taniSoutiOkButton.UseVisualStyleBackColor = true;

            #endregion

            // 個別パラメータ設定
            taniSoutiButton.Text = taniSoutiName;
            // TODO 消毒槽の消毒薬残量など、個別の外観検査結果を入力する場合がある模様?

            // TODO 実際には、DBの値を取得する
            string scumFrom;
            string scumTo;
            (formData as SuishitsuKensaEntryFormData).GetTaniSochiScumValue(taniSoutiCd, out scumFrom, out scumTo);

            scumFromTextBox.Text = scumFrom;
            scumToTextBox.Text = scumTo;

            // 単位装置ボタンイベント設定
            SetButtonValueCallBack(taniSoutiButton, SuishitsuKensaEntryFormData.TANI_SOCHI_CD, taniSoutiGrpCd, formData);

            // 登録ボタンイベント設定
            SetButtonEntryCallBack(taniSoutiOkButton, taniSoutiCd, taniSoutiName, scumFromTextBox, scumToTextBox, formData);

            return elementPanel;
        }