Id | +标题 | +内容 | +作者 | +操作 | +
---|---|---|---|---|
@item.Id | +@item.tittle | +@item.conment | +@item.author | ++ 编辑 + 删除 + | +
From dc4ac866b8fc24e9c4d1128f382c0cdd714e8165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E6=85=A7=E5=A9=B7?= <14091808+dont-like-lamian-noodles@user.noreply.gitee.com> Date: Sun, 8 Dec 2024 20:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../One/Controllers/BlogsController.cs" | 8 +- .../One/Controllers/HomeController.cs" | 5 +- .../One/Controllers/TableController.cs" | 25 +++++ .../One/Models/Sm.cs" | 18 ++++ .../One/Models/Table.cs" | 9 ++ .../One/Views/Home/Privacy.cshtml" | 6 -- .../One/Views/Table/Add.cshtml" | 1 + .../One/Views/Table/Delete.cshtml" | 1 + .../One/Views/Table/Edit.cshtml" | 1 + .../One/Views/Table/index.cshtml" | 33 ++++++ .../One/bin/Debug/net8.0/One.dll" | Bin 55808 -> 68096 bytes .../One/bin/Debug/net8.0/One.exe" | Bin 138752 -> 138752 bytes .../One/bin/Debug/net8.0/One.pdb" | Bin 41756 -> 47864 bytes .../net8.0/One.staticwebassets.runtime.json" | 2 +- .../One/obj/Debug/net8.0/One.AssemblyInfo.cs" | 2 +- .../net8.0/One.AssemblyInfoInputs.cache" | 2 +- ...GeneratedMSBuildEditorConfig.editorconfig" | 20 +++- .../One.csproj.CoreCompileInputs.cache" | 2 +- .../net8.0/One.csproj.FileListAbsolute.txt" | 30 ++++++ .../One/obj/Debug/net8.0/One.dll" | Bin 55808 -> 68096 bytes .../One/obj/Debug/net8.0/One.pdb" | Bin 41756 -> 47864 bytes .../One/obj/Debug/net8.0/apphost.exe" | Bin 138752 -> 138752 bytes .../One/obj/Debug/net8.0/ref/One.dll" | Bin 19456 -> 23040 bytes .../One/obj/Debug/net8.0/refint/One.dll" | Bin 19456 -> 23040 bytes .../Debug/net8.0/staticwebassets.build.json" | 8 +- .../net8.0/staticwebassets.development.json" | 2 +- .../Debug/net8.0/staticwebassets.pack.json" | 4 +- ...icrosoft.AspNetCore.StaticWebAssets.props" | 6 +- .../One/wwwroot/css/base.css" | 102 ++++++++++++++++++ .../One/wwwroot/css/site.css" | 22 ---- 30 files changed, 254 insertions(+), 55 deletions(-) create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Controllers/TableController.cs" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Models/Sm.cs" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Models/Table.cs" delete mode 100644 "\351\255\217\346\205\247\345\251\267/One/Views/Home/Privacy.cshtml" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Views/Table/Add.cshtml" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Views/Table/Delete.cshtml" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Views/Table/Edit.cshtml" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/Views/Table/index.cshtml" create mode 100644 "\351\255\217\346\205\247\345\251\267/One/wwwroot/css/base.css" delete mode 100644 "\351\255\217\346\205\247\345\251\267/One/wwwroot/css/site.css" diff --git "a/\351\255\217\346\205\247\345\251\267/One/Controllers/BlogsController.cs" "b/\351\255\217\346\205\247\345\251\267/One/Controllers/BlogsController.cs" index af6b959..56015b5 100644 --- "a/\351\255\217\346\205\247\345\251\267/One/Controllers/BlogsController.cs" +++ "b/\351\255\217\346\205\247\345\251\267/One/Controllers/BlogsController.cs" @@ -1,4 +1,5 @@ +using System.Collections; using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using One.Models; @@ -11,9 +12,6 @@ public class BlogsController : Controller var random1 = new Random(); var randomnum1 = random1.Next(0, 10); return Content(randomnum1.ToString()); - var random2 = new Random(); - var randomnum2 = random2.Next(0,100); - return Content(randomnum2.ToString()); } public IActionResult Test2() { @@ -30,8 +28,8 @@ public class BlogsController : Controller for (int i = 0; i < 10; i++) { var randomnum3 = random3.Next(5,81); - list.Add(randomnum3) + list1.Add(randomnum3); } - return Content(randomnum3.ToString()); + return Content(list1.ToString()); } } diff --git "a/\351\255\217\346\205\247\345\251\267/One/Controllers/HomeController.cs" "b/\351\255\217\346\205\247\345\251\267/One/Controllers/HomeController.cs" index dc9ca42..b312dbd 100644 --- "a/\351\255\217\346\205\247\345\251\267/One/Controllers/HomeController.cs" +++ "b/\351\255\217\346\205\247\345\251\267/One/Controllers/HomeController.cs" @@ -18,10 +18,7 @@ public class HomeController : Controller return View(); } - public IActionResult Privacy() - { - return View(); - } + public IActionResult B(){ return View(); diff --git "a/\351\255\217\346\205\247\345\251\267/One/Controllers/TableController.cs" "b/\351\255\217\346\205\247\345\251\267/One/Controllers/TableController.cs" new file mode 100644 index 0000000..96c4fde --- /dev/null +++ "b/\351\255\217\346\205\247\345\251\267/One/Controllers/TableController.cs" @@ -0,0 +1,25 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using One.Models; + +namespace One.Controllers; +public class tableController : Controller +{ + public IActionResult Index() + { + return View(Sm.Table); + } + public IActionResult Add() + { + return View(); + } + public IActionResult Edit() + { + return View(); + } + public IActionResult Delete() + { + return View(); + } + +} \ No newline at end of file diff --git "a/\351\255\217\346\205\247\345\251\267/One/Models/Sm.cs" "b/\351\255\217\346\205\247\345\251\267/One/Models/Sm.cs" new file mode 100644 index 0000000..ec3c181 --- /dev/null +++ "b/\351\255\217\346\205\247\345\251\267/One/Models/Sm.cs" @@ -0,0 +1,18 @@ +namespace One.Models; +public static class Sm{ + public static List