$.ajax({
type: "POST",
dataType: "json",
url: "/HourlyProduction/Save",
traditional: true,
contentType: "application/json;charset=utf-8",
data: JSON.stringify(_hourlyProduction),
success: function (data) {
_hourlyProduction = jQuery.parseJSON(data);
if(_hourlyProduction.Message.trim() != ""){
alert(_hourlyProduction.Message);
return false;
}
$("#dtHourlyProduction").data("kendoDatePicker").enable(false);
alert("Successfully saved.");
window.location.href=_defaultHref;
},
error: function (xhr, status, error) {
alert(error);
_hourlyProduction.HourlyProductions = [];
SetPrimaryKeys(_hourlyProduction);
}
});
0 Comments