Projektdateien hinzufügen.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using DOCGEN;
|
||||
using EDOKA_Database;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Model;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace EDOOKAAPI.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class Dokumente : ControllerBase
|
||||
{
|
||||
|
||||
|
||||
[HttpGet("GetDoc{DocID}", Name = "GetDoc")]
|
||||
public IActionResult GetDoc(string DocID)
|
||||
{
|
||||
DOCGEN.clsGetDoc gd = new DOCGEN.clsGetDoc(AppParams.connectionstring);
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
dok = gd.GetDoc(DocID);
|
||||
if (dok.doktype == "")
|
||||
{
|
||||
//dok.doktype = Get_FileType(dok.dokument);
|
||||
}
|
||||
gd = null;
|
||||
return Ok(dok);
|
||||
|
||||
}
|
||||
[HttpGet("GetDoc/PDF{DocID}", Name = "GetPDF")]
|
||||
public IActionResult GetDocAsPDF(string DocID)
|
||||
{
|
||||
DOCGEN.clsGetDoc gd = new DOCGEN.clsGetDoc(AppParams.connectionstring);
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
dok.dokument= gd.GetDocAsPDF(DocID);
|
||||
dok.doktype = "P";
|
||||
dok.extension = "pdf";
|
||||
return Ok(dok);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user