bps-rw/Controllers/DataRwController.cs

129 lines
5.3 KiB
C#

using Microsoft.AspNetCore.Mvc;
namespace BpsRwApp.Controllers
{
[Route("/[controller]/[action]")]
public class DataRwController : AppControllerBase
{
public IActionResult Index()
{
return View();
}
[HttpGet]
public IActionResult Table()
{
var data = new[]
{
new {
rw = "001",
kecamatan = "Kebayoran",
jumlah_rumah_memilah = 581,
jumlah_rumah_nasabah = 701,
jumlah_bank_sampah = 581,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "002",
kecamatan = "Tebet",
jumlah_rumah_memilah = 889,
jumlah_rumah_nasabah = 934,
jumlah_bank_sampah = 889,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "003",
kecamatan = "Menteng",
jumlah_rumah_memilah = 673,
jumlah_rumah_nasabah = 1378,
jumlah_bank_sampah = 673,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "004",
kecamatan = "Cilandak",
jumlah_rumah_memilah = 790,
jumlah_rumah_nasabah = 1094,
jumlah_bank_sampah = 790,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "005",
kecamatan = "Setiabudi",
jumlah_rumah_memilah = 750,
jumlah_rumah_nasabah = 794,
jumlah_bank_sampah = 750,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "006",
kecamatan = "Gambir",
jumlah_rumah_memilah = 780,
jumlah_rumah_nasabah = 1573,
jumlah_bank_sampah = 780,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "007",
kecamatan = "Cakung",
jumlah_rumah_memilah = 552,
jumlah_rumah_nasabah = 1160,
jumlah_bank_sampah = 552,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "008",
kecamatan = "Kelapa Gading",
jumlah_rumah_memilah = 582,
jumlah_rumah_nasabah = 1663,
jumlah_bank_sampah = 582,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "009",
kecamatan = "Pancoran",
jumlah_rumah_memilah = 935,
jumlah_rumah_nasabah = 730,
jumlah_bank_sampah = 935,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
new {
rw = "010",
kecamatan = "Tanah Abang",
jumlah_rumah_memilah = 593,
jumlah_rumah_nasabah = 1046,
jumlah_bank_sampah = 593,
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-ghost btn-square btn-xs\"><span class=\"icon icon-fill text-sm\">more_horiz</span></a>" +
"</div>",
},
};
var response = new
{
data = data
};
return Json(response);
}
}
}