public getConfig() { try { adp.Fill(cTbl); CONYXDataSet.環境設定Row r = cTbl.FindByID(global.configKEY); global.cnfYear = r.年; global.cnfMonth = r.月; global.cnfPath = r.汎用データ出力先; global.cnfArchived = r.データ保存月数; global.cnfMarume = r.丸め単位; if (r.Is編集済み背景色Null()) { global.cnfEditBackColor = ""; } else { global.cnfEditBackColor = r.編集済み背景色; } } catch (Exception ex) { MessageBox.Show(ex.Message, "環境設定年月取得", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } finally { } }
private void DataUpdate() { // エラーチェック if (!errCheck()) { return; } if (MessageBox.Show("データを更新してよろしいですか", "確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No) { return; } CONYXDataSet.環境設定Row r = dts.環境設定.Single(a => a.ID == global.configKEY); r.年 = Utility.StrtoInt(txtYear.Text); r.月 = Utility.StrtoInt(txtMonth.Text); r.汎用データ出力先 = txtCsvPath.Text; r.データ保存月数 = Utility.StrtoInt(txtDataSpan.Text); r.編集アカウント = global.flgOff; r.更新年月日 = DateTime.Now; r.丸め単位 = Utility.StrtoInt(txtMarume.Text); r.編集済み背景色 = label8.Text; // データ更新 cAdp.Update(r); //// ユーザー設定の編集項目背景色の更新 //if (lblColor.Text != "未設定") //{ // Properties.Settings.Default.editBackColors = label8.Text; // Properties.Settings.Default.Save(); //} // 終了 this.Close(); }