///<summary> ///showtShohinList ///商品リストに移動(前提) ///</summary> private void showShohinList() { //商品リストを一回以上開いたことがない場合 if (shouhinlist == null) { shouhinlist = new ShouhinList(this); try { //検索項目に一つでも記入がある場合 if (labelSet_Daibunrui.codeTxt.blIsEmpty() == false && labelSet_Chubunrui.codeTxt.blIsEmpty() == false && labelSet_Maker.codeTxt.blIsEmpty() == false && txtKensaku.blIsEmpty() == false) { shouhinlist.blKensaku = false; } else { shouhinlist.blKensaku = true; } shouhinlist.intFrmKind = CommonTeisu.FRM_SHOHIN; shouhinlist.strYMD = ""; shouhinlist.strEigyoushoCode = ""; shouhinlist.lsDaibunrui = labelSet_Daibunrui; shouhinlist.lsChubunrui = labelSet_Chubunrui; shouhinlist.lsMaker = labelSet_Maker; shouhinlist.btxtKensaku = txtKensaku; shouhinlist.btxtHinC1 = txtData1; shouhinlist.btxtHinC2 = txtData2; shouhinlist.btxtHinC3 = txtData3; shouhinlist.btxtHinC4 = txtData4; shouhinlist.btxtHinC5 = txtData5; shouhinlist.btxtHinC6 = txtData6; shouhinlist.bmtxtHyojunBaika = txtHyojun; shouhinlist.bmtxtShireTanka = txtShire; shouhinlist.bmtxtHyokaTanka = txtHyoka; shouhinlist.bmtxtTateneShire = txtTatene; shouhinlist.btxtZaikokbn = txtZaiko; shouhinlist.lsTanabanH = labelSet_TanabanHonsha; shouhinlist.lsTanabanG = labelSet_TanabanGihu; shouhinlist.btxtMemo = txtMemo; shouhinlist.bmtxtTeika = txtTeika; shouhinlist.bmtxtHakosu = txtHako; shouhinlist.btxtComment = txtComment; shouhinlist.lblGrayYM = lblGrayToroku; shouhinlist.btxtShohinCd = txtShohinCd; shouhinlist.lblGrayHinMakerDaiCdChuCdHinban = lblGrayShohin; shouhinlist.blShohinMaster = true; shouhinlist.chbxHontoroku = chbxHontoroku; shouhinlist.ShowDialog(); shouhinlist.Close(); shouhinlist.Dispose(); shouhinlist = null; //初回時用、二回目以降は無くても動作する if (txtShohinCd.Text != "") { txtData1.Focus(); } } 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; } } else { //既に1回以上商品リストを表示しているので、hideを元に戻す shouhinlist.Show(); //再検索 shouhinlist.setShohinView(); } }
///<summary> ///judShohinKeyDown ///キー入力判定 ///</summary> private void judShohinKeyDown(object sender, KeyEventArgs e) { //キー入力情報によって動作を変える switch (e.KeyCode) { case Keys.Tab: break; case Keys.Left: break; case Keys.Right: break; case Keys.Up: break; case Keys.Down: break; case Keys.Delete: break; case Keys.Back: break; case Keys.Enter: break; case Keys.F1: logger.Info(LogUtil.getMessage(this._Title, "登録実行")); this.addShohin(); break; case Keys.F2: break; case Keys.F3: logger.Info(LogUtil.getMessage(this._Title, "削除実行")); this.delShohin(); break; case Keys.F4: logger.Info(LogUtil.getMessage(this._Title, "取消実行")); this.delText(); break; case Keys.F5: break; case Keys.F6: break; case Keys.F7: break; case Keys.F8: break; case Keys.F9: break; case Keys.F10: logger.Info(LogUtil.getMessage(this._Title, "本棚無実行")); this.showShohinListTana(); break; case Keys.F11: break; case Keys.F12: logger.Info(LogUtil.getMessage(this._Title, "終了実行")); //商品リストが一回以上開いたことがある場合 if (shouhinlist != null) { shouhinlist.Close(); } this.Close(); break; default: break; } }