From 4f49ae9887cc403ce24dcd3af60c60aa1095dbdb Mon Sep 17 00:00:00 2001 From: Falcon <12919280+falconfly@user.noreply.gitee.com> Date: Fri, 2 Aug 2024 15:17:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CalendarNotepad/WorkMain.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CalendarNotepad/WorkMain.cs b/CalendarNotepad/WorkMain.cs index b24fd8e..53b78a1 100644 --- a/CalendarNotepad/WorkMain.cs +++ b/CalendarNotepad/WorkMain.cs @@ -377,6 +377,7 @@ namespace CalendarNotepad } var item = items[0]; var fileName = item.Text; + var fileKey = item.SubItems[2].Text; var dlgr = Interaction.InputBox($"原文件名:{fileName}",Title: "修改文件名",DefaultResponse: fileName); if(dlgr == "") { return; @@ -385,7 +386,7 @@ namespace CalendarNotepad return; } var wd = this.WorkDayKey; - this.Db.Updateable().Where(a => a.WorkDay == wd).SetColumns(a => a.FileName == dlgr).ExecuteCommand(); + this.Db.Updateable().Where(a => a.WorkDay == wd && a.FileKey == fileKey).SetColumns(a => a.FileName == dlgr).ExecuteCommand(); item.Text = dlgr; MessageBox.Show("文件名修改完成"); }