Functioning partial view usings ajax
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
time_format wall_milli
|
time_format wall_milli
|
||||||
duration_format string
|
duration_format string
|
||||||
}
|
}
|
||||||
|
level debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,15 +29,6 @@ namespace WebPostPartialJsonObject.Controllers
|
|||||||
HttpContext.Session.SetObject("KioskSettings", data);
|
HttpContext.Session.SetObject("KioskSettings", data);
|
||||||
return RedirectToAction("Index", "Settings");
|
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()
|
public IActionResult Privacy()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
|
|||||||
@@ -11,5 +11,13 @@ namespace WebPostPartialJsonObject.Controllers
|
|||||||
ExpectedViewModel data = HttpContext.Session.GetObject<ExpectedViewModel>("KioskSettings");
|
ExpectedViewModel data = HttpContext.Session.GetObject<ExpectedViewModel>("KioskSettings");
|
||||||
return View(data);
|
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": {
|
"WebPostPartialJsonObject": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "http://localhost:5000",
|
"applicationUrl": "http://+:5000",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<input type="submit" value="Save" class="btn btn-primary" />
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
var id = element.data('ckinid');
|
var id = element.data('ckinid');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '/Home/Reprint',
|
url: '/Settings/Reprint',
|
||||||
data: { 'ckinid': id },
|
data: { 'ckinid': id },
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
$('#reprintLabelsForm').html(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