Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Config.frmConfig frm = new Config.frmConfig();
            frm.ShowDialog();
            this.Show();

            // 環境設定情報取得
            DSLG_OCR.Config.getConfig c = new Config.getConfig();
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            // フォーム最大サイズ
            Utility.WindowsMaxSize(this, this.Width, this.Height);

            // フォーム最小サイズ
            Utility.WindowsMinSize(this, this.Width, this.Height);

            // 環境設定情報取得
            DSLG_OCR.Config.getConfig c = new Config.getConfig();

            // 配車データパス
            lblHdataPath.Text = global.cnfHaishaPath;
        }
Exemplo n.º 3
0
        /// ---------------------------------------------------------------
        /// <summary>
        ///     配車データ選択 </summary>
        /// <returns>
        ///     パスを含むファイル名</returns>
        /// ---------------------------------------------------------------
        private string openHaishaData()
        {
            string result = string.Empty;

            //ダイアログボックスの初期設定
            openFileDialog1.Title            = "配車データ選択";
            openFileDialog1.CheckFileExists  = true;
            openFileDialog1.RestoreDirectory = true;
            openFileDialog1.FileName         = "";
            openFileDialog1.Filter           = "CSVファイル(*.csv)|*.csv|テキストファイル(*.txt)|*.txt";

            //ダイアログボックスの表示
            DialogResult ret = openFileDialog1.ShowDialog();

            if (ret == System.Windows.Forms.DialogResult.Cancel)
            {
                return(result);
            }

            if (MessageBox.Show(openFileDialog1.FileName + Environment.NewLine + " が選択されました。よろしいですか?", "Excelアサイン確認書取り込み", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return(result);
            }

            // 環境設定テーブル更新
            DSLGDataSet dts = new DSLGDataSet();

            DSLGDataSetTableAdapters.環境設定TableAdapter adp = new DSLGDataSetTableAdapters.環境設定TableAdapter();
            adp.Fill(dts.環境設定);

            var s = dts.環境設定.Single(a => a.ID == global.configKEY);

            s.配車データパス = openFileDialog1.FileName;
            s.更新年月日   = DateTime.Now;
            adp.Update(dts.環境設定);

            // 環境設定情報取得
            DSLG_OCR.Config.getConfig c = new Config.getConfig();

            // ファイルのパスを返す
            return(openFileDialog1.FileName);
        }