45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using SteamWare;
|
|
using SteamWare.Reports;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
|
|
namespace MP_MAG.Controllers
|
|
{
|
|
public class PrintQueueConfController : ApiController
|
|
{
|
|
/// <summary>
|
|
/// Restituisce un array JSon x le conf delle code di stampa
|
|
/// GET: api/PrintQueueConf
|
|
/// </summary>
|
|
/// <returns>lista oggetto Json in formato SteamwareSDK.queueConf</returns>
|
|
public List<SteamWare.Reports.queueConf> Get()
|
|
{
|
|
List<SteamWare.Reports.queueConf> 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;
|
|
}
|
|
}
|
|
}
|