using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace [Link]
{
[Area("User")]
public class StudFormController : Controller
{
private readonly IWebHostEnvironment environment;
public StudFormController(IWebHostEnvironment environment)
{
[Link] = environment;
}
public IActionResult StudentForm()
{
return View(new InvoiceModel());
}
public FileStreamResult Download(InvoiceModel model)
{
var tipStudent = [Link];
// Load template document.
var path = [Link]([Link],
"[Link]");
var document = [Link](path);
DateTime dataNasterii = model.Data_nasterii;
string dataNasteriiFormatata = [Link]("dd-MM-yyyy");
[Link](new
{
Data_nasterii = dataNasteriiFormatata
});
// Execute mail merge process.
[Link](model);
// Save document in specified file format.
var stream = new MemoryStream();
[Link](stream, [Link]);
// Set the stream position to the beginning of the file.
//[Link](0, [Link]);
[Link](0, 0);
// Download file.
return File(stream, [Link], $"ContractCompletat
{[Link]} {[Link]}.{[Link]()}");
// [ResponseCache(Duration = 0, Location = [Link],
NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel() { RequestId = [Link]?.Id ??
[Link] });
}
}
}