Ejemplo n.º 1
0
 ///<summary>
 ///FormMove
 ///戻るボタンの処理
 ///カラム論理名
 ///</summary>
 public void FormMove(int intFrmKind)
 {
     //全てのフォームの中から
     foreach (System.Windows.Forms.Form frm in Application.OpenForms)
     {
         //棚卸入力フォームを探す
         if (intFrmKind == CommonTeisu.FRM_TANAOROSHI && frm.Name == "F0140_TanaorosiInput")
         {
             //データを連れてくるため、newをしないこと
             F0140_TanaorosiInput tanaorosiinput = (F0140_TanaorosiInput)frm;
             tanaorosiinput.setShohinClose();
             break;
         }
         //商品元帳確認フォームを探す
         else if (intFrmKind == CommonTeisu.FRM_SHOHINMOTOCHOKAKUNIN && frm.Name == "D0380_ShohinMotochoKakunin")
         {
             //データを連れてくるため、newをしないこと
             D0380_ShohinMotochoKakunin shohinmotochokakunin = (D0380_ShohinMotochoKakunin)frm;
             shohinmotochokakunin.setShohinClose();
             break;
         }
         //発注入力のフォームを探す
         else if (intFrmKind == CommonTeisu.FRM_HACHUINPUT && frm.Name == "A0100_HachuInput")
         {
             //データを連れてくるため、newをしないこと
             A0100_HachuInput hachuinput = (A0100_HachuInput)frm;
             hachuinput.closeShohinList();
             break;
         }
         //目的のフォームを探す
         else if (intFrmKind == CommonTeisu.FRM_SHOHINBETSURIEKIRITSUSETTEI && frm.Name == "M1210_ShohinbetsuRiekiritsuSettei")
         {
             //データを連れてくるため、newをしないこと
             M1210_ShohinbetsuRiekiritsuSettei shohinbetsuriekiritsusettei = (M1210_ShohinbetsuRiekiritsuSettei)frm;
             shohinbetsuriekiritsusettei.setShohinClose();
             break;
         }
         //特定向け先単価のフォームを探す
         else if (intFrmKind == CommonTeisu.FRM_TOKUTEIMUKESAKITANKA && frm.Name == "M1160_TokuteimukesakiTanka")
         {
             //データを連れてくるため、newをしないこと
             M1160_TokuteimukesakiTanka tokuteimukesakitanka = (M1160_TokuteimukesakiTanka)frm;
             tokuteimukesakitanka.setShohinClose();
             break;
         }
     }
 }
Ejemplo n.º 2
0
        ///<summary>
        ///EndAction
        ///戻るボタンの処理
        ///</summary>
        private void EndAction(List <string> lstSelectData)
        {
            //データグリッドビューからデータを選択且つセット系から来た場合
            if (lblSetChubun != null && lstSelectData.Count != 0)
            {
                // 遷移前の大分類と選択した中分類のチェック
                ChubunruiList_B chubunlistB  = new ChubunruiList_B();
                DataTable       dtChubunlist = chubunlistB.getSelectItemChk(lstSelectData[0], strBefDaibuncd);

                if (dtChubunlist.Rows.Count > 0)
                {
                    //セットの中に検索結果データを入れる
                    lblSetChubun.CodeTxtText    = dtChubunlist.Rows[0]["中分類コード"].ToString();
                    lblSetChubun.ValueLabelText = dtChubunlist.Rows[0]["中分類名"].ToString();

                    //全てのフォームの中から(LIST系)
                    foreach (System.Windows.Forms.Form frm in Application.OpenForms)
                    {
                        //商品LISTのフォームを探す
                        if (frm.Name == "ShouhinList")
                        {
                            //データを連れてくるため、newをしないこと
                            ShouhinList shouhinlist = (ShouhinList)frm;

                            //中分類のセット
                            shouhinlist.setChubun();
                            break;
                        }
                    }

                    //全てのフォームの中から(FORM系)
                    foreach (System.Windows.Forms.Form frm in Application.OpenForms)
                    {
                        //商品のフォームを探す
                        if (frm.Name == "M1030_Shohin")
                        {
                            //データを連れてくるため、newをしないこと
                            M1030_Shohin shohinHome = (M1030_Shohin)frm;

                            //中分類のセット
                            shohinHome.setChubun();
                            break;
                        }
                        //棚卸入力のフォームを探す
                        if (frm.Name == "F0140_TanaorosiInput")
                        {
                            //データを連れてくるため、newをしないこと
                            F0140_TanaorosiInput tanaHome = (F0140_TanaorosiInput)frm;
                            tanaHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                        //商品元帳確認のフォームを探す
                        if (frm.Name == "D0380_ShohinMotochoKakunin")
                        {
                            //データを連れてくるため、newをしないこと
                            D0380_ShohinMotochoKakunin shohinmotoHome = (D0380_ShohinMotochoKakunin)frm;
                            shohinmotoHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                        //発注入力のフォームを探す
                        if (frm.Name == "A0100_HachuInput")
                        {
                            //データを連れてくるため、newをしないこと
                            A0100_HachuInput hachuHome = (A0100_HachuInput)frm;
                            hachuHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                    }
                }
                else
                {
                    //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();

                    // セットの中にエラーの為、空白を入れる
                    lblSetChubun.CodeTxtText    = "";
                    lblSetChubun.ValueLabelText = "";
                }
            }

            this.Close();

            //ビジネス層のインスタンス生成
            ChubunruiList_B chubunListB = new ChubunruiList_B();

            try
            {
                //画面終了処理
                chubunListB.FormMove(intFrmKind);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }
Ejemplo n.º 3
0
        ///<summary>
        ///EndAction
        ///戻るボタンの処理
        ///</summary>
        public void EndAction(List <string> lstSelectId)
        {
            if (lblSetDaibunrui.blMessageOn == false)
            {
                //データグリッドビューからデータを選択且つセット系から来た場合
                if (lblSetMaker != null && lstSelectId.Count != 0)
                {
                    //セットの中に検索結果データを入れる
                    lblSetMaker.CodeTxtText    = lstSelectId[0];
                    lblSetMaker.ValueLabelText = lstSelectId[1];

                    //全てのフォームの中から
                    foreach (System.Windows.Forms.Form frm in Application.OpenForms)
                    {
                        //商品のフォームを探す
                        if (frm.Name == "M1030_Shohin")
                        {
                            //データを連れてくるため、newをしないこと
                            M1030_Shohin shohinHome = (M1030_Shohin)frm;
                            shohinHome.setMaker();
                            break;
                        }
                        //棚卸入力のフォームを探す
                        if (frm.Name == "F0140_TanaorosiInput")
                        {
                            //データを連れてくるため、newをしないこと
                            F0140_TanaorosiInput tanaHome = (F0140_TanaorosiInput)frm;
                            tanaHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                        //商品元帳確認のフォームを探す
                        if (frm.Name == "D0380_ShohinMotochoKakunin")
                        {
                            //データを連れてくるため、newをしないこと
                            D0380_ShohinMotochoKakunin shohinmotoHome = (D0380_ShohinMotochoKakunin)frm;
                            shohinmotoHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                        //発注入力のフォームを探す
                        if (frm.Name == "A0100_HachuInput")
                        {
                            //データを連れてくるため、newをしないこと
                            A0100_HachuInput hachuHome = (A0100_HachuInput)frm;
                            hachuHome.setDaibun(strSubDaibunCd);
                            break;
                        }
                    }
                }
            }

            this.Close();

            //ビジネス層のインスタンス生成
            MakerList_B makerlistB = new MakerList_B();

            try
            {
                //画面終了処理
                makerlistB.FormMove(intFrmKind);
            }
            catch (Exception ex)
            {
                //エラーロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }