using SteamWare;
using SteamWare.Reports;
using System.Collections.Generic;
using System.Web.Http;
namespace MP_MAG.Controllers
{
public class PrintQueueConfController : ApiController
{
///
/// Restituisce un array JSon x le conf delle code di stampa
/// GET: api/PrintQueueConf
///
/// lista oggetto Json in formato SteamwareSDK.queueConf
public List Get()
{
List answ = MagData.MagDataLayer.man.queueConfJson;
// se vuoto... creo!
if (answ.Count == 0)
{
SteamWare.Reports.queueConf currConf;
SteamWare.Reports.devInfoParam currDevInfoParam = new SteamWare.Reports.devInfoParam()
{
OutputFormat = "EMF",
PageHeight = "297mm",
PageWidth = "210mm",
MarginBottom = "10mm",
MarginLeft = "10mm",
MarginRight = "10mm",
MarginTop = "10mm"
};
currConf = new SteamWare.Reports.queueConf()
{
name = "default",
template = "missing.rdlc",
printerName = "Microsoft Print to PDF",
deviceInfoParam = currDevInfoParam
};
answ.Add(currConf);
}
return answ;
}
}
}