ajax代碼
var obj = {};
obj.RoomName = "";
obj.RoomCode = "";
$.ajax({
type: "POST",
url: url,
data: JSON.stringify(obj),
//contentType是關鍵,設置后,以json字符串的形式提交數據即可
contentType: 'application/json',
dataType: "json",
success: function (result) {
},
error: function (data) {
console.info("請求錯誤,請檢查您的請求!");
}
});
后台代碼
public string UpdateSchedulingInfo(List<SchedulingInfo> dataList, List<long> userList)
{
RequestWhere request = CreateRequestWhere();
ResponseResult<string> response = new ResponseResult<string>();
return ToJson(response);
}
