diff --git a/Powork/Repository/MemoRepository.cs b/Powork/Repository/MemoRepository.cs
index 963b6d9..e6bb184 100644
--- a/Powork/Repository/MemoRepository.cs
+++ b/Powork/Repository/MemoRepository.cs
@@ -23,11 +23,11 @@ public static string SelectMemo(string date)
return string.Empty;
}
- public static string SelectPreviousMemoDate(string date)
+ public static string SelectPreviousMemoDate(string date, string search)
{
SQLiteConnection connection = CommonRepository.GetConnection();
- string sql = $"SELECT * FROM TMemo WHERE date < '{date}' AND memo IS NOT NULL AND memo <> '' ORDER BY date DESC LIMIT 1";
+ string sql = $"SELECT * FROM TMemo WHERE date < '{date}' AND memo IS NOT NULL AND memo <> '' AND memo LIKE '%{search}%' ORDER BY date DESC LIMIT 1";
using (SQLiteCommand command = new SQLiteCommand(sql, connection))
{
@@ -42,11 +42,11 @@ public static string SelectPreviousMemoDate(string date)
return null;
}
- public static string SelectNextMemoDate(string date)
+ public static string SelectNextMemoDate(string date, string search)
{
SQLiteConnection connection = CommonRepository.GetConnection();
- string sql = $"SELECT * FROM TMemo WHERE date > '{date}' AND memo IS NOT NULL AND memo <> '' ORDER BY date ASC LIMIT 1";
+ string sql = $"SELECT * FROM TMemo WHERE date > '{date}' AND memo IS NOT NULL AND memo <> '' AND memo LIKE '%{search}%' ORDER BY date ASC LIMIT 1";
using (SQLiteCommand command = new SQLiteCommand(sql, connection))
{
diff --git a/Powork/View/MainWindow.xaml b/Powork/View/MainWindow.xaml
index d8d1120..c65416e 100644
--- a/Powork/View/MainWindow.xaml
+++ b/Powork/View/MainWindow.xaml
@@ -173,7 +173,7 @@
-
+
diff --git a/Powork/View/MemoPage.xaml b/Powork/View/MemoPage.xaml
index 92962b4..22f1a83 100644
--- a/Powork/View/MemoPage.xaml
+++ b/Powork/View/MemoPage.xaml
@@ -37,6 +37,7 @@
+
@@ -50,26 +51,27 @@
-