31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "UpdateBUCosts";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
}
|
|
<script type="text/javascript">
|
|
function failed(failedScenarios) {
|
|
if (!failedScenarios || failedScenarios.length <= 0) {
|
|
success();
|
|
}
|
|
else {
|
|
var value = '';
|
|
for (var i = 0; i < failedScenarios.length; i++) {
|
|
value += (failedScenarios[i] + '\r\n');
|
|
}
|
|
$('#scenarios').val(value);
|
|
alert('Some scenarios were not recalculated. Please, take a look and try again.');
|
|
}
|
|
};
|
|
function success() {
|
|
$('#scenarios').val('');
|
|
alert('All scenarios were recalculated successfully.');
|
|
};
|
|
</script>
|
|
<div class="row">
|
|
@using (Ajax.BeginForm("UpdateBUCosts", "Scenarios", new AjaxOptions() { HttpMethod = "POST" }))
|
|
{
|
|
<textarea id="scenarios" name="scenarios" style="width: 100%;" rows="15"></textarea>
|
|
<button type="submit" class="pull-right">Update BU costs</button>
|
|
}
|
|
</div> |