//update class status function
$(document).on('click', '#btnUpdate', function(){
    let id = $(this).data('id');

    $.ajax({
        url: base_url + "user/get/" + id,
        type: "GET",
        dataType: "json",
        success: function(data){
            $('#updid').val(data.id);

            $('#updfirst_name').val(data.first_name);
            $('#updlast_name').val(data.last_name);
            $('#updusername').val(data.username);
            $('#updcontact_no_1').val(data.contact_no_1);
            $('#updcontact_no_2').val(data.contact_no_2);
            $('#updpassword').val(data.password);
            $('#updemail').val(data.email);
            $('#upduser_role_id').val(data.user_role_id);
            $('#updstatus').val(data.status);
        },
        error:function(){
            alert('Unable to load data');
        }
    });
});

//delete class status function
$(document).on('click', '#btnDelete', function(){
    let id = $(this).data('id');
    $('#delid').val(id);
});



