Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmComSelect frm = new frmComSelect(1);

            frm.ShowDialog();

            if (frm._pFileName != string.Empty)
            {
                // 選択領域のファイル名を取得します
                string _grpID         = frm._pID;
                string _exfileName    = frm._pFileName;
                string _exSheetNum    = frm._pSheetNum;
                int    _yakushokuType = frm._pYakushokuType;

                frm.Dispose();

                // 出勤簿データ作成画面
                OCR.frmCorrect frmg = new frmCorrect(_exfileName, _exSheetNum, _yakushokuType, _grpID, string.Empty);
                frmg.ShowDialog();
            }
            else
            {
                frm.Dispose();
            }

            this.Show();
        }
Exemple #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            string outPath = string.Empty;

            // OCR入力パス
            if (Properties.Settings.Default.PC == global.PC1SELECT.ToString())
            {
                outPath = Properties.Settings.Default.PathInst + Properties.Settings.Default.DATAS1;
            }
            else
            {
                outPath = Properties.Settings.Default.PathInst + Properties.Settings.Default.DATAS2;
            }

            var s = System.IO.Directory.GetFiles(outPath, "*.CSV");

            if (s.Count() != 0)
            {
                string msg = string.Empty;
                msg += "受渡し勤怠データ作成途中のOCR認識データが残っています。" + Environment.NewLine + Environment.NewLine;
                msg += "先に受渡し勤怠データ作成を行ってください。";
                MessageBox.Show(msg, "確認", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            // 勤怠データ新規登録画面表示
            frmCorrect frmData = new frmCorrect(global.sADDMODE);

            frmData.ShowDialog();
            this.Show();
        }
Exemple #3
0
        private void btnDataEntry_Click(object sender, EventArgs e)
        {
            // 環境設定年月の確認
            string msg = "設定年月は " + global.sYear.ToString() + "年 " + global.sMonth.ToString() + "月です。よろしいですか?";

            if (MessageBox.Show(msg, "勤務データ登録", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No)
            {
                return;
            }

            this.Hide();

            // 会社領域を選択します
            Model.frmComSelect frm = new frmComSelect();
            frm.ShowDialog();
            if (global.pblComNo == global.NON_SELECT)
            {
                this.Show();
                return;
            }

            // 勤怠データ登録画面表示
            ScanOcr.frmCorrect frmData = new frmCorrect(global.pblComNo, global.pblComName, global.pblDbName);
            frmData.ShowDialog();
            this.Show();
        }
Exemple #4
0
        private void btnDataEntry_Click(object sender, EventArgs e)
        {
            // 環境設定年月の確認
            string msg = "設定年月は " + global.sYear.ToString() + "年 " + global.sMonth.ToString() + "月です。よろしいですか?";

            if (MessageBox.Show(msg, "勤務データ登録", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No)
            {
                return;
            }

            int _usrSel = global.END_SELECT;

            this.Hide();

            // 処理をするスタッフの種類を選択します
            PrePrint.frmUserSelect frm = new PrePrint.frmUserSelect();
            frm.Text = "勤怠データ登録";
            frm.ShowDialog();
            _usrSel = frm._usrSel;
            frm.Dispose();

            if (_usrSel == global.END_SELECT)
            {
                this.Show();
                return;
            }

            // 勤怠データ登録画面表示
            ScanOcr.frmCorrect frmData = new frmCorrect(_usrSel, global.sEDITMODE);
            frmData.ShowDialog();
            this.Show();
        }
Exemple #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmCorrect frm = new frmCorrect(string.Empty);

            frm.ShowDialog();
            this.Show();
        }
Exemple #6
0
        /// <summary>
        /// データ登録
        /// </summary>
        private void DataEntry()
        {
            // 2019/04/04 コメント化
            //string msg = "設定年月は " + global.sYear.ToString() + "年 " + global.sMonth.ToString() + "月です。よろしいですか?";

            // 環境設定年月の確認:西暦表示 2019/04/04
            string msg = "設定年月は " + (global.sYear + Properties.Settings.Default.RekiHosei) + "年 " + global.sMonth.ToString() + "月です。よろしいですか?";

            if (MessageBox.Show(msg, "勤務データ登録", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No)
            {
                return;
            }

            this.Hide();

            // 勤怠データ登録画面表示
            frmCorrect frmData = new frmCorrect(global.sEDITMODE);

            frmData.ShowDialog();
            this.Show();
        }
Exemple #7
0
        private void button2_Click(object sender, EventArgs e)
        {
            int HoldCnt = System.IO.Directory.GetFiles(Properties.Settings.Default.HoldTifPath, "*.tif").Count();
            int RecCnt  = System.IO.Directory.GetFiles(Properties.Settings.Default.recPath, "*.tif").Count();

            // 保留、リカバリ伝票の選択画面
            if ((HoldCnt + RecCnt) > 0)
            {
                this.Hide();
                frmHoldRec frms = new frmHoldRec();
                frms.ShowDialog();
                this.Show();
            }

            // 修正画面
            this.Hide();
            frmCorrect frm = new frmCorrect();

            frm.ShowDialog();
            this.Show();
        }
Exemple #8
0
        private void btnDataAddNew_Click(object sender, EventArgs e)
        {
            int _usrSel = global.END_SELECT;

            this.Hide();

            // 処理をするスタッフの種類を選択します
            PrePrint.frmUserSelect frm = new PrePrint.frmUserSelect();
            frm.Text = "勤怠データ登録";
            frm.ShowDialog();
            _usrSel = frm._usrSel;
            frm.Dispose();

            if (_usrSel == global.END_SELECT)
            {
                this.Show();
                return;
            }

            // 勤怠データ登録画面表示
            ScanOcr.frmCorrect frmData = new frmCorrect(_usrSel, global.sADDMODE);
            frmData.ShowDialog();
            this.Show();
        }
Exemple #9
0
        private void KintaiData()
        {
            // 自らのロックファイルを削除する
            Utility.deleteLockFile(Properties.Settings.Default.DataPath, Properties.Settings.Default.lockFileName);

            //他のPCで処理中の場合、続行不可
            if (Utility.existsLockFile(Properties.Settings.Default.DataPath))
            {
                MessageBox.Show("他のPCで処理中です。しばらくおまちください。", "確認", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            // タイマー監視受信した出勤簿件数
            int s = System.IO.Directory.GetFiles(Properties.Settings.Default.DataPath, "*.tif").Count();

            // 処理可能なデータが存在するか?
            // OCR認識データ
            bool _ocrFile = false;

            foreach (var dir in System.IO.Directory.GetDirectories(Properties.Settings.Default.DataPath))
            {
                if (System.IO.Directory.GetFiles(dir, "*.csv").Any())
                {
                    _ocrFile = true;
                    break;
                }
            }

            // リカバリ処理データが存在するか?:2020/06/16
            bool _NgRec = false;

            if (System.IO.Directory.GetFiles(Properties.Settings.Default.MyDataPath, "*.csv").Any())
            {
                _NgRec = true;
            }

            // ローカルデータベース:リカバリ処理データを条件に追加 2020/06/16
            //if (!_ocrFile && tblFax.Count() == 0 && tblHold.Count() == 0)
            if (!_ocrFile && tblFax.Count() == 0 && tblHold.Count() == 0 && !_NgRec)
            {
                MessageBox.Show("現在、処理可能なFAX発注書データはありません", "確認", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            //LOCKファイル作成
            Utility.makeLockFile(Properties.Settings.Default.DataPath, Properties.Settings.Default.lockFileName);

            this.Hide();

            // 処理するデータを取得
            frmFaxSelect frmFax = new frmFaxSelect();

            frmFax.ShowDialog();

            int  _myCnt  = frmFax.myCnt;
            bool _myBool = frmFax.myBool;

            frmFax.Dispose();

            // ロックファイルを削除する
            Utility.deleteLockFile(Properties.Settings.Default.DataPath, Properties.Settings.Default.lockFileName);

            if (!_myBool)
            {
                Show();
            }
            else
            {
                // データ作成処理へ
                frmCorrect frm = new frmCorrect(string.Empty);
                frm.ShowDialog();
                Show();
            }
        }
Exemple #10
0
        private void button4_Click(object sender, EventArgs e)
        {
            NHBR_CLIDataSet dtsC = new NHBR_CLIDataSet();

            NHBR_CLIDataSetTableAdapters.FAX注文書TableAdapter adp  = new NHBR_CLIDataSetTableAdapters.FAX注文書TableAdapter();
            NHBR_CLIDataSetTableAdapters.保留注文書TableAdapter  hAdp = new NHBR_CLIDataSetTableAdapters.保留注文書TableAdapter();

            // データ読み込み
            adp.Fill(dtsC.FAX注文書);
            hAdp.Fill(dtsC.保留注文書);

            // 自らのロックファイルを削除する
            Utility.deleteLockFile(Properties.Settings.Default.dataPath, Properties.Settings.Default.lockFileName);

            //他のPCで処理中の場合、続行不可
            if (Utility.existsLockFile(Properties.Settings.Default.dataPath))
            {
                MessageBox.Show("他のPCで処理中です。しばらくおまちください。", "確認", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            // タイマー監視受信したFAX発注書件数
            int s = System.IO.Directory.GetFiles(Properties.Settings.Default.dataPath, "*.tif").Count();

            // 処理中の注文書データ
            int d = dtsC.FAX注文書.Count();

            // 保留中データ
            int h = dtsC.保留注文書.Count();

            // 処理可能なデータが存在するか?
            if (s == 0 && d == 0 && h == 0)
            {
                MessageBox.Show("現在、処理可能なFAX注文書データはありません", "確認", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            //LOCKファイル作成
            Utility.makeLockFile(Properties.Settings.Default.dataPath, Properties.Settings.Default.lockFileName);

            this.Hide();

            // 担当者コードを入力
            frmUserCode frmCode = new frmUserCode();

            frmCode.ShowDialog();

            string _myCode = frmCode.myCode;

            frmCode.Dispose();

            if (_myCode == string.Empty)
            {
                // ロックファイルを削除する
                Utility.deleteLockFile(Properties.Settings.Default.dataPath, Properties.Settings.Default.lockFileName);

                // 処理をキャンセル
                Show();
            }
            else
            {
                // 処理するデータを取得
                frmFaxSelect frmFax = new frmFaxSelect();
                frmFax.ShowDialog();

                int  _myCnt  = frmFax.myCnt;
                bool _myBool = frmFax.myBool;
                frmFax.Dispose();

                // ロックファイルを削除する
                Utility.deleteLockFile(Properties.Settings.Default.dataPath, Properties.Settings.Default.lockFileName);

                if (!_myBool)
                {
                    Show();
                }
                else
                {
                    // データ作成処理へ
                    frmCorrect frm = new frmCorrect(_myCode.ToString());
                    frm.ShowDialog();
                }
            }

            Show();
        }