Functioning partial view usings ajax
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
time_format wall_milli
|
||||
duration_format string
|
||||
}
|
||||
level debug
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,15 +29,6 @@ namespace WebPostPartialJsonObject.Controllers
|
||||
HttpContext.Session.SetObject("KioskSettings", data);
|
||||
return RedirectToAction("Index", "Settings");
|
||||
}
|
||||
[HttpPost]
|
||||
public IActionResult Reprint([FromForm]int ckinid)
|
||||
{
|
||||
ReprintInfo model = new ReprintInfo();
|
||||
model.CkInId = ckinid;
|
||||
model.PrinterName = "printer";
|
||||
return PartialView("ReprintView", model);
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
|
||||
@@ -11,5 +11,13 @@ namespace WebPostPartialJsonObject.Controllers
|
||||
ExpectedViewModel data = HttpContext.Session.GetObject<ExpectedViewModel>("KioskSettings");
|
||||
return View(data);
|
||||
}
|
||||
[HttpPost]
|
||||
public IActionResult Reprint([FromForm] int ckinid)
|
||||
{
|
||||
ReprintInfo model = new ReprintInfo();
|
||||
model.CkInId = ckinid;
|
||||
model.PrinterName = "printer";
|
||||
return PartialView("ReprintView", model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"WebPostPartialJsonObject": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"applicationUrl": "http://+:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
<div id="ReprintModal" class="modal" tabindex="-1" role="dialog">
|
||||
<div id="reprintLabels" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -58,7 +58,7 @@
|
||||
var id = element.data('ckinid');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/Home/Reprint',
|
||||
url: '/Settings/Reprint',
|
||||
data: { 'ckinid': id },
|
||||
success: function (response) {
|
||||
$('#reprintLabelsForm').html(response);
|
||||
|
||||
@@ -6,4 +6,5 @@
|
||||
|
||||
}
|
||||
|
||||
<h1>Partial View @Model.CkInId</h1>
|
||||
<h5>Partial View @Model.CkInId</h5>
|
||||
<div>Printer: @Model.PrinterName</div>
|
||||
Reference in New Issue
Block a user