Here is my code. On click of the button I am trying to enter an enum flag value in to a database table, but I am getting a reference error.
<button type="button" class="btn btn-default clean" data-id="@item.RoomId">status</button>
$(function () {
$('.clean').click(function () {
$.post("@Url.Action("SetStatus", "ReceptionHk")", {
id: $(this).data("id"),
newStatus: @EnumHkStatus.Cleaning
});
});
});
[Flags]
public enum EnumHkStatus
{
None,
Repair,
Cleaning,
InventoryCheck,
Occupied
};
on click of the button i am trying to enter value in the status column as int value as it is in the enumerator with flags but i am getting following error
ReferenceError: Cleaning is not defined
Please help me with this