示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // キャプションにバージョンを追加 2018/04/19
            this.Text += "  ver " + Application.ProductVersion;

            // 画面サイズ
            Utility.WindowsMaxSize(this, this.Width, this.Height);
            Utility.WindowsMinSize(this, this.Width, this.Height);

            //  ローカルフォルダ作成処理
            Utility.dirCreate(Properties.Settings.Default.DATAS1);
            Utility.dirCreate(Properties.Settings.Default.DATAS2);
            Utility.dirCreate(Properties.Settings.Default.DATAJ1);
            Utility.dirCreate(Properties.Settings.Default.DATAJ1);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathMDB);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathXLS);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathNG);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathREAD);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathOK);
            Utility.dirCreate(Properties.Settings.Default.PathInst + Properties.Settings.Default.PathTRAY);

            // 設定情報を取得します
            msConfig ms = new msConfig();

            ms.GetCommonYearMonth();
        }
示例#2
0
        /// <summary>
        /// 環境設定データ新規登録処理
        /// </summary>
        private void AddNewRecord()
        {
            msConfig ms = new msConfig();

            ms.Insert(global.sIDKEY, txtMsts.Text, txtTif.Text, txtDat.Text, int.Parse(cmbBkdels.Text),
                      txtScanner.Text, txtYear.Text, txtMonth.Text, DateTime.Today);
        }
示例#3
0
        /// <summary>
        /// 環境設定データ書き換え
        /// </summary>
        private void EditRecord()
        {
            msConfig ms = new msConfig();

            ms.UpDate(txtMsts.Text, txtTif.Text, txtDat.Text, int.Parse(cmbBkdels.Text),
                      txtScanner.Text, txtYear.Text, txtMonth.Text, DateTime.Today);
        }
示例#4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (errCheck())
            {
                switch (fMode)
                {
                case ADDNEW:
                    AddNewRecord();
                    break;

                case EDIT:
                    EditRecord();
                    break;
                }
            }

            // 設定対象年月を取得します
            msConfig ms = new msConfig();

            ms.GetCommonYearMonth();

            //// マスター(CSV)パスを取得します
            //GetStaffMstPath();

            //// スタッフCSVデータをMDBへインポートします
            //GetCsvToMdb(sMstPath, Common.global.STAFF_SELECT);

            //// パートCSVデータをMDBへインポートします
            //GetCsvToMdb(pMstPath, Common.global.PART_SELECT);

            // 終了します
            this.Close();
        }
示例#5
0
        private void DataShow()
        {
            // 表示項目クリア
            DispClear();

            // 環境設定データ取得
            msConfig        ms = new msConfig();
            OleDbDataReader dr = ms.Select(global.sIDKEY);

            try
            {
                while (dr.Read())
                {
                    fMode = EDIT;

                    if (dr["SYEAR"].ToString().Length == 4)
                    {
                        txtYear.Text = dr["SYEAR"].ToString().Substring(2, 2);
                    }
                    else
                    {
                        txtYear.Text = dr["SYEAR"].ToString();
                    }

                    txtMonth.Text = dr["SMONTH"].ToString();
                    txtMsts.Text  = dr["MSTS"].ToString();
                    txtDat.Text   = dr["DAT"].ToString();
                    txtTif.Text   = dr["TIF"].ToString();

                    cmbBkdels.SelectedIndex = Utility.comboBkDel.selectedIndex(cmbBkdels, int.Parse(dr["BKDELS"].ToString()));

                    fMode = 1;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "環境設定", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            finally
            {
                if (dr.IsClosed == false)
                {
                    dr.Close();
                }
                if (ms.sCom.Connection.State == ConnectionState.Open)
                {
                    ms.sCom.Connection.Close();
                }
            }
        }