diff --git a/Areas/Admin/Controllers/DataRtController.cs b/Areas/Admin/Controllers/DataRtController.cs new file mode 100644 index 0000000..92e182b --- /dev/null +++ b/Areas/Admin/Controllers/DataRtController.cs @@ -0,0 +1,78 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BpsRwApp.Areas.Admin.Controllers +{ + [Area("Admin")] + public class DataRtController : Controller + { + public IActionResult Index() + { + return View(); + } + + [HttpGet] + public IActionResult Table() + { + var data = new[] + { + new { + rt = "001", + rw = "001", + kecamatan = "Kebayoran", + }, + new { + rt = "002", + rw = "001", + kecamatan = "Tebet", + }, + new { + rt = "003", + rw = "001", + kecamatan = "Menteng", + }, + new { + rt = "004", + rw = "001", + kecamatan = "Cilandak", + }, + new { + rt = "005", + rw = "001", + kecamatan = "Setiabudi", + }, + new { + rt = "006", + rw = "001", + kecamatan = "Gambir", + }, + new { + rt = "007", + rw = "001", + kecamatan = "Cakung", + }, + new { + rt = "008", + rw = "001", + kecamatan = "Kelapa Gading", + }, + new { + rt = "009", + rw = "001", + kecamatan = "Pancoran", + }, + new { + rt = "010", + rw = "001", + kecamatan = "Tanah Abang", + }, + }; + + var response = new + { + data = data + }; + + return Json(response); + } + } +} diff --git a/Areas/Admin/Views/DataRt/Index.cshtml b/Areas/Admin/Views/DataRt/Index.cshtml new file mode 100644 index 0000000..2af236f --- /dev/null +++ b/Areas/Admin/Views/DataRt/Index.cshtml @@ -0,0 +1,64 @@ +@{ + ViewData["Title"] = "Data RT"; +} + +
+ + +| No | +RT | +RW | +Kecamatan | +
|---|