using Newtonsoft.Json; using SteamWare; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web; using System.Web.Http; namespace NKC_WF.Controllers { public class ResponseModel { public List queueList { set; get; } = new List(); } public class PrintQueueConfController : ApiController { /// /// Restituisce un array JSon x le conf delle code di stampa /// GET: api/PrintQueue /// /// lista oggetto Json in formato SteamwareSDK.queueConf public List Get() { ResponseModel fullAnsw = new ResponseModel(); List answ = new List(); // !!!FIXME!!! per ora hard coded, da usare conf file... queueConf currConf; string outForm = "EMF"; string pagWidth = "8.5in"; string pagHeigth = "11in"; string margin = "0.5in"; devInfoParam currDevInfoParam = new devInfoParam(outForm, pagHeigth, pagWidth, margin, margin, margin, margin); currConf = new queueConf() { name = "queueBin", template = "BinLabel.rdlc", printerName = "Microsoft Print to PDF", deviceInfoParam = currDevInfoParam, rdsName = "stp_prt_BinLabel" }; answ.Add(currConf); currConf = new queueConf() { name = "queueBunk", template = "StackLabel.rdlc", printerName = "Microsoft Print to PDF", deviceInfoParam = currDevInfoParam, rdsName = "stp_prt_StackLabel" }; answ.Add(currConf); currConf = new queueConf() { name = "queueCart", template = "CartLabel.rdlc", printerName = "Microsoft Print to PDF", deviceInfoParam = currDevInfoParam, rdsName = "stp_prt_CartLabel" }; answ.Add(currConf); fullAnsw.queueList = answ; //return fullAnsw; return answ; } // GET: api/PrintQueue/5 public string Get(int id) { return "value"; } } }