搜尋身份證號, 電話功能選項
This commit is contained in:
@@ -298,6 +298,34 @@ namespace Model
|
||||
var timestamp = DateTime.Now.ToString("HHmmss");
|
||||
return prefix + datePart + timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新指定 follower 的 search_keywords 欄位
|
||||
/// </summary>
|
||||
/// <param name="followerId">follower 的 ID</param>
|
||||
/// <returns>是否成功更新</returns>
|
||||
public static bool UpdateSearchKeywords(int followerId)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var db = new Model.ezEntities())
|
||||
{
|
||||
var follower = db.followers.Find(followerId);
|
||||
if (follower == null)
|
||||
return false;
|
||||
|
||||
MyWeb.encrypt enc = new MyWeb.encrypt();
|
||||
follower.search_keywords = enc.GenerateSearchKeywords(follower);
|
||||
|
||||
db.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user