private void btnOutput_Click(object sender, EventArgs e)
        {
            if (dgvWorkHead.Rows.Count == 0)
            {
                MessageBox.Show("沒有檔案可以輸出!");
                return;
            }

            List <WorkModel> workModels = _workManager.ReadDgvToModel(dgvWorkHead);

            if (workModels.Count == 0)
            {
                MessageBox.Show("請選擇工單輸出!");
                return;
            }

            if (tbxOutputFileName.Text.Trim() == "")
            {
                MessageBox.Show("請輸入檔名!");
                return;
            }

            if (tbxOutputPath.Text.Trim() == "")
            {
                MessageBox.Show("請輸入路徑!");
                return;
            }

            if (Directory.Exists(tbxOutputPath.Text) == false)
            {
                MessageBox.Show(tbxOutputPath.Text + "找不到此路徑!");
                return;
            }


            _mainController.SetSavePath(tbxOutputPath.Text);

            setControl(true);

            _outPutFullPath = tbxOutputPath.Text + "\\" + tbxOutputFileName.Text + ".xlsx";
            Thread thread = new Thread(output);

            thread.IsBackground = true;
            thread.Start(workModels);
        }