public static string ShowRecentInfo() { if (!string.IsNullOrWhiteSpace(CommonViewModel.RecentActionStatus) && EachTaskModel.IsSpecificDateTask(CommonViewModel.RecentSelectedEachTaskId, DateTimeOffset.Now.LocalDateTime.Date)) { EachTask eachTask = EachTaskModel.GetEachTask(CommonViewModel.RecentSelectedEachTaskId); return($"現在の状態:{eachTask.Content} {CommonViewModel.RecentActionStatus}"); } else { return($"現在の状態:1日の作業開始前"); } }
public static string ShowRecentInfo() { try { if (!string.IsNullOrWhiteSpace(CommonViewModel.RecentActionStatus) && EachTaskModel.IsSpecificDateTask(CommonViewModel.RecentSelectedEachTaskId, DateTimeOffset.Now.LocalDateTime.Date)) { EachTask eachTask = EachTaskModel.GetEachTask(CommonViewModel.RecentSelectedEachTaskId); return($"{GetLangMessage.GetMessage("Msg1008")}:{eachTask.Content} {GetLangMessage.GetMessage(CommonViewModel.RecentActionStatus)}"); } else { return($"{GetLangMessage.GetMessage("Msg1008")}:{GetLangMessage.GetMessage("Msg1009")}"); } } catch { return(GetLangMessage.GetMessage("Exception")); } }