You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1006 B
36 lines
1006 B
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace EDOOKAAPI.Controllers
|
|
{
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class Dokumente : ControllerBase
|
|
{
|
|
[HttpGet("GetDoc/{DocID}")]
|
|
public IActionResult GetDoc(string Docid)
|
|
{
|
|
{
|
|
EDOKA_Database.EDOKA_DB db = new EDOKA_Database.EDOKA_DB();
|
|
string sql = "Select dbo.BinaryToBase64(dokument) as Data from doks ";
|
|
sql = sql + "WHERE dbo.doks.dokumentid = '" + Docid + "' ";
|
|
db.Get_Tabledata(sql, false, true);
|
|
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
|
{
|
|
return Ok(db.dsdaten.Tables[0].Rows[0][0]);
|
|
}
|
|
else
|
|
{
|
|
return BadRequest("Dokument nicht vorhanden.");
|
|
}
|
|
}
|
|
}
|
|
|
|
public IActionResult GetDocAsPDF(string Docid)
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
}
|