If I understand well. Let say when you click on the checkBox of the User he must be updated to the project? Whatn you can also do is create an Action
who will save your User for the project.
[HttpPost]
public ActionResult AddUserToProj(int userId){
//retreive the User by the Id with a Linq query or
//just add to ProjUsers the Id of the UserId with other importants informations you can
//pass via th eparameters
}
And then in your view, in your JS function
an Ajax Method who will be called let's say if your your user is checked then you call the Action
$(function () {
$("[data-impetro-uitype='selectable']").bind("mousedown", function (e) {
e.metaKey = true;
})
.selectable({
filter: "tr",
create: function (event, ui) {
var selectable = $(this);
var valueEle = selectable.attr("data-impetro-selectorvalues");
var valArr = $(valueEle).val().split(";");
for (var i = 0; i < valArr.length; i++) {
if (valArr[i] == "") {
continue;
}
var id = valArr[i];
selectable.find(id).addClass("ui-selected");
}
}
});
$('#check').bind('change', function () {
if($(this).is(':checked'))
{//You can ask a question here by a popup
var userID= $("userId") //You retreive userId in the line by wise selection
$.ajax({
url: "@Url.Action("AddUserToProj","ControllerName")",
type: 'POST',
dataType: 'json',
data: {id = $userID },
async: false,
success: function (result) {
// process the results from the server
alert('done')
});
},
error: function (errorThrown) {
alert('error');
}
});
}
else
{
// unchecked, You can call a Deletion Method if you create another Action to do that
}
});
});