function UpdateAccess() { var permissionModel = new Object(); permissionModel.RoleId = $("#accessid").val(); permissionModel.Role = $("#role").val(); permissionModel.Tag = $("#tag").val(); permissionModel.Status = $("#status").val(); return $.ajax({ contentType: 'application/json; charset=utf-8', dataType: 'json', type: 'POST', url: "/Home/SaveAccess", data: JSON.stringify({ permissionModel: permissionModel }), success: function (result) { if (result.result) { Reset(); dataTable.ajax.reload(); $("#AccessModal").modal('hide'); } else { swal("Access Fail!") } }, error: function () { swal("Error") } }); }