Example #1
0
        // サブプロシージャ:モジュールの登録、通常モード
        private void registerModuleNormalMode()
        {
            // 2016.08.10 FUJII  トレーIDの新規採番プロシージャ「GetNewTrayId」を、トランザクション処理バージョンへ変更
            //トレーIDの新規採番
            //string trayNew = getNewTrayId(txtLoginDept.Text, txtLoginName.Text, VBS.Mid(maxLot, 8, 1), cmbBinShift.Text);
            TfSQL  tf      = new TfSQL();
            string trayNew = tf.sqlGetNewTrayId(txtLoginDept.Text, txtLoginName.Text, VBS.Mid(maxLot, 8, 1), cmbBinShift.Text, maxLot, dtLot, ref registerDate);

            if (trayNew == string.Empty)
            {
                MessageBox.Show("An error happened in the tray id issuing process.", "Process Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //モジュールテーブルへ、データテーブルのレコードを一括登録する
            bool res = tf.sqlMultipleInsertModule(dtModule, trayNew);

            if (res)
            {
                //ラベルのプリントアウト
                TfSato tfs = new TfSato();
                tfs.printStart("tray", trayNew, dtLot, string.Empty, dtpRegisterDate.Value, string.Empty, string.Empty, 1, string.Empty);

                //登録済みの状態を表示
                txtTrayId.Text        = trayNew;
                dtpRegisterDate.Value = registerDate;

                //親フォームfrmTrayのデータグリットビューを更新するため、デレゲートイベントを発生させる
                this.RefreshEvent(this, new EventArgs());
                this.Focus();
                MessageBox.Show("Tray ID: " + trayNew + Environment.NewLine +
                                "and its modules were registered.", "Process Result", MessageBoxButtons.OK, MessageBoxIcon.Information);

                //ユーザーによるメッセージボックス確認後の処理
                txtTrayId.Text   = String.Empty;
                txtModuleId.Text = String.Empty;
                dtModule.Clear();
                capacity = 24;
                updateDataGridViews(dtModule, ref dgvModule);
            }
        }
Example #2
0
        // サブプロシージャ:シリアルの構成要素のパターンが適正か、ユーザーデスクトップの設定ファイルを使用して確認する
        private string matchSerialNumberingPattern(string serial)
        {
            string result = string.Empty;

            // 設定ファイル LINE = XXX の場合は、検証しない
            // if (line == "XXX") return string.Empty;
            if (!plant.Equals("XXX") && VBS.Mid(serial, 1, 3) != plant)
            {
                return("Plant '" + VBS.Mid(serial, 1, 3) + "'");
            }
            else if (!year.Equals("XXX") && VBS.Mid(serial, 4, 1) != year)
            {
                return("Year '" + VBS.Mid(serial, 4, 1) + "'");
            }
            else if (!week.Equals("XXX") && VBS.Mid(serial, 5, 2) != week)
            {
                return("Week '" + VBS.Mid(serial, 5, 2) + "'");
            }
            else if (!day.Equals("XXX") && VBS.Mid(serial, 7, 1) != day)
            {
                return("Day '" + VBS.Mid(serial, 7, 1) + "'");
            }
            else if (!line.Equals("XXX") && VBS.Mid(serial, 8, 1) != line)
            {
                return("Line '" + VBS.Mid(serial, 8, 1) + "'");
            }
            else if (!eeee.Equals("XXX") && VBS.Mid(serial, 12, 4) != eeee)
            {
                return("4E '" + VBS.Mid(serial, 12, 4) + "'");
            }
            else if (!revision.Equals("XXX") && VBS.Mid(serial, 16, 1) != revision)
            {
                return("Revision '" + VBS.Mid(serial, 16, 1) + "'");
            }
            else if (!mass.Equals("XXX") && VBS.Mid(serial, 19, 1) != mass)
            {
                return("Mass '" + VBS.Mid(serial, 19, 1) + "'");
            }
            else if (!flexure.Equals("XXX") && VBS.Mid(serial, 20, 1) != flexure)
            {
                return("Flexure '" + VBS.Mid(serial, 20, 1) + "'");
            }
            else if (!cover_base.Equals("XXX") && VBS.Mid(serial, 21, 1) != cover_base)
            {
                return("Cover/base '" + VBS.Mid(serial, 21, 1) + "'");
            }
            else if (!dframe.Equals("XXX") && VBS.Mid(serial, 22, 1) != dframe)
            {
                return("D-Frame '" + VBS.Mid(serial, 22, 1) + "'");
            }
            else if (!fpc.Equals("XXX") && VBS.Mid(serial, 23, 1) != fpc)
            {
                return("FPC '" + VBS.Mid(serial, 23, 1) + "'");
            }
            else if (!shift.Equals("XXX") && VBS.Mid(serial, 24, 1) != shift)
            {
                return("Shift '" + VBS.Mid(serial, 24, 1) + "'");
            }
            else
            {
                return(string.Empty);
            }
        }