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.
41 lines
1.1 KiB
41 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web.Http;
|
|
using DOCGEN;
|
|
using Model;
|
|
|
|
|
|
namespace EDOKAAPI_NetFramework.Controllers
|
|
{
|
|
public class DocumentController : ApiController
|
|
{
|
|
|
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
|
[HttpGet]
|
|
[Route("API/GetDocument")]
|
|
public IHttpActionResult GetDocument(string dokid)
|
|
{
|
|
DOCGEN.clsGetDoc gd = new clsGetDoc(connectionstring);
|
|
clsdok dok = new clsdok("", "", "");
|
|
dok = gd.GetDoc(dokid);
|
|
return Ok(dok);
|
|
}
|
|
|
|
[HttpGet]
|
|
[Route("API/GetDocumentPDF")]
|
|
public IHttpActionResult GetDocumentPDF(string dokid)
|
|
{
|
|
DOCGEN.clsGetDoc gd = new clsGetDoc(connectionstring);
|
|
clsdok dok = new clsdok("", "", "");
|
|
dok = gd.GetDocAsPDF(dokid);
|
|
dok.extension = "pdf";
|
|
dok.doktype = "P";
|
|
return Ok(dok);
|
|
}
|
|
}
|
|
}
|