guys. I'm a newbie in developing the web using .NET 6.0. So, I have a table in views that has a button. With that button, I want to update the enum field value in all records. Do you have any idea? Because when I'm trying using Ajax, I'm getting confused how to get the data.
<script>
function Synchronize()
{
var invoice = $('#invoiceTable').DataTable();
alert("Sync jalan");
$.ajax(
{
type: "POST",
url: '@Url.Action("Synchronize", "Tax")',
data: { },
error: function (result) {
swal("Oops","There is a Problem, Try Again!","error", {
icon : "error",
buttons: {
confirm: {
className : 'btn btn-danger'
}
},
});
},
success: function (result) {
console.log(result);
if (result.status == true) {
swal(result.message, {
icon : "success",
buttons: {
confirm: {
className : 'btn btn-success'
}
},
});
window.location.href = '@Url.Action("DataInvoice", "Tax")';
}
else {
swal(result.message, {
icon : "error",
buttons: {
confirm: {
className : 'btn btn-danger'
}
},
});
}
}
});
}