$("#btnTestProduceUsageSettings").click(function () {
var dom = $('#dayofmonthselect').val();
var ord = $('#ordinalselect').val();
var dow = $('#dayofweekselect').val();
var wom = $('#weekormonthselect').val();
var daterangefromval = $('#produsagefrom').val();
var daterangetoval = $('#produsageto').val();
var unitval = $('#unitsselect').val();
var reportId = 1;
$.ajax({
type: 'GET',
url: '@Url.Action("GetTestSettingVals", "TestSettings")',
data: { unit: unitval, report: reportId, dayofmonth: dom, ordinal: ord, dayofweek: dow,
weekormonth: wom, fromval: daterangefromval, toval: daterangetoval },
cache: false,
success: function (returneddata) {
var nextgendate = returneddata.testsettings.NextGenDate;
var nextfromdate = returneddata.testsettings.NextFromDate;
var nexttodate = returneddata.testsettings.NextToDate;
alert('If you save the current configuration, the Produce Usage report would next be
sent on ' + nextgendate + ' and cover data from ' + nextfromdate + ' to ' + nexttodate);
},
error: function () {
alert('error in btnTestProduceUsageSettings');
}
});
});