From 50af377bf2668ccdc68a06a2dc9ac74edf44f6a4 Mon Sep 17 00:00:00 2001 From: Sakurai Date: Sun, 9 Feb 2025 11:14:06 +0900 Subject: [PATCH] Add good list --- Uriagekun/Controllers/GoodsController.cs | 10 ++++- Uriagekun/Views/Goods/Index.cshtml | 52 ++++++++++++------------ Uriagekun/Views/Goods/Register.cshtml | 30 ++++++++++++++ 3 files changed, 65 insertions(+), 27 deletions(-) create mode 100644 Uriagekun/Views/Goods/Register.cshtml diff --git a/Uriagekun/Controllers/GoodsController.cs b/Uriagekun/Controllers/GoodsController.cs index b995534..3becef7 100644 --- a/Uriagekun/Controllers/GoodsController.cs +++ b/Uriagekun/Controllers/GoodsController.cs @@ -13,7 +13,15 @@ public class GoodsController : Controller this.repository = repository; } - public IActionResult Index() + public async Task Index() + { + int offset = 0; + int count = 100; + var ret = await this.repository.GetGoods(offset, count).ConfigureAwait(false); + return View(ret); + } + + public IActionResult Register() { return View(); } diff --git a/Uriagekun/Views/Goods/Index.cshtml b/Uriagekun/Views/Goods/Index.cshtml index 3e01a11..9920a87 100644 --- a/Uriagekun/Views/Goods/Index.cshtml +++ b/Uriagekun/Views/Goods/Index.cshtml @@ -1,32 +1,32 @@ +@model List @{ ViewData["Title"] = "商品管理"; } -
-
-

商品登録

-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
-
+
+

商品管理

+
+ + + + + + + + + + + @foreach(var data in Model) { + + + + + + + } + +
商品ID商品名バーコード売上確認
@(data.Id)@(data.Label)@(data.Barcode) + 売上確認ページ +
diff --git a/Uriagekun/Views/Goods/Register.cshtml b/Uriagekun/Views/Goods/Register.cshtml new file mode 100644 index 0000000..571f526 --- /dev/null +++ b/Uriagekun/Views/Goods/Register.cshtml @@ -0,0 +1,30 @@ +@{ + ViewData["Title"] = "商品登録"; +} + +
+

商品登録

+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+