Functional partialview via ajax
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,6 +3,9 @@
|
|||||||
##
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
Caddy/*
|
||||||
|
!Caddyfile
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
|
|||||||
15
Caddy/Caddyfile
Normal file
15
Caddy/Caddyfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
log {
|
||||||
|
output stderr
|
||||||
|
format json {
|
||||||
|
time_local
|
||||||
|
time_format wall_milli
|
||||||
|
duration_format string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
http://*:9000 {
|
||||||
|
reverse_proxy localhost:5000
|
||||||
|
log
|
||||||
|
}
|
||||||
@@ -29,10 +29,13 @@ namespace WebPostPartialJsonObject.Controllers
|
|||||||
HttpContext.Session.SetObject("KioskSettings", data);
|
HttpContext.Session.SetObject("KioskSettings", data);
|
||||||
return RedirectToAction("Index", "Settings");
|
return RedirectToAction("Index", "Settings");
|
||||||
}
|
}
|
||||||
[HttpPost, Consumes("application/json")]
|
[HttpPost]
|
||||||
public IActionResult Reprint(int ckinid)
|
public IActionResult Reprint([FromForm]int ckinid)
|
||||||
{
|
{
|
||||||
return PartialView("Reprint");
|
ReprintInfo model = new ReprintInfo();
|
||||||
|
model.CkInId = ckinid;
|
||||||
|
model.PrinterName = "printer";
|
||||||
|
return PartialView("ReprintView", model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Privacy()
|
public IActionResult Privacy()
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
namespace WebPostPartialJsonObject.Models
|
||||||
public class ReprintInfo
|
|
||||||
{
|
{
|
||||||
public IEnumerable<string> LabelSets { get; set; }
|
|
||||||
public IEnumerable<string> LabelNames { get; set; }
|
public class ReprintInfo
|
||||||
public int PrinterType { get; set; }
|
{
|
||||||
public string PrinterName { get; set; }
|
public IEnumerable<string> LabelSets { get; set; }
|
||||||
|
public IEnumerable<string> LabelNames { get; set; }
|
||||||
|
public int PrinterType { get; set; }
|
||||||
|
public string PrinterName { get; set; }
|
||||||
|
public int CkInId { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
@*
|
@*
|
||||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||||
*@
|
*@
|
||||||
|
@model WebPostPartialJsonObject.Models.ReprintInfo
|
||||||
@{
|
@{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<h1>Partial View</h1>
|
<h1>Partial View @Model.CkInId</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user