From 0e26d895ed0f3f5c8f269f5078d5bdc93fa39e48 Mon Sep 17 00:00:00 2001 From: Kuznec Date: Thu, 4 Apr 2024 16:42:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83=20Hello,=20?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=B0=D1=8E=D1=89=D0=B5=D0=B5=D1=81?= =?UTF-8?q?=D1=8F=20=D0=BD=D0=B0=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebApplicationLesson1/Controllers/HomeController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/WebApplicationLesson1/Controllers/HomeController.cs b/WebApplicationLesson1/Controllers/HomeController.cs index e915d40..ed7c488 100644 --- a/WebApplicationLesson1/Controllers/HomeController.cs +++ b/WebApplicationLesson1/Controllers/HomeController.cs @@ -23,6 +23,18 @@ public IActionResult Index() return View(); } + public string Hello() + { + if (DateTime.Now.Hour < 6) + return "Доброй ночи!"; + if (DateTime.Now.Hour < 12) + return "Доброе утро!"; + if (DateTime.Now.Hour < 18) + return "Добрый день!"; + + return "Добрый вечер!"; + } + public IActionResult Privacy() { return View();