修复修改文件名的BUG
This commit is contained in:
parent
62d6d6d920
commit
4f49ae9887
|
@ -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<WorkUnitPlusFile>().Where(a => a.WorkDay == wd).SetColumns(a => a.FileName == dlgr).ExecuteCommand();
|
||||
this.Db.Updateable<WorkUnitPlusFile>().Where(a => a.WorkDay == wd && a.FileKey == fileKey).SetColumns(a => a.FileName == dlgr).ExecuteCommand();
|
||||
item.Text = dlgr;
|
||||
MessageBox.Show("文件名修改完成");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user