使用常量

This commit is contained in:
milimoe 2024-10-25 01:15:00 +08:00
parent b2368e54a4
commit 1a17fa14b2
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E

View File

@ -32,7 +32,7 @@ namespace Oshima.Core.Controllers
if (sql != null) if (sql != null)
{ {
sql.ExecuteDataSet(ServerLoginLogs.Select_GetLastLoginTime()); sql.ExecuteDataSet(ServerLoginLogs.Select_GetLastLoginTime());
if (sql.Success && DateTime.TryParse(sql.DataSet.Tables[0].Rows[0]["LastTime"].ToString(), out DateTime date)) if (sql.Success && DateTime.TryParse(sql.DataSet.Tables[0].Rows[0][ServerLoginLogs.Column_LastTime].ToString(), out DateTime date))
{ {
string month = date.ToString("MMM", CultureInfo.InvariantCulture); string month = date.ToString("MMM", CultureInfo.InvariantCulture);
int day = date.Day; int day = date.Day;