WIP estimate tex

This commit is contained in:
Paul Schneider 2016-11-03 17:34:19 +01:00
commit 4abf8db596
5 changed files with 155 additions and 31 deletions

View file

@ -89,13 +89,22 @@ namespace Yavsc.Controllers
}
[Produces("text/x-tex"), Authorize,
Route("Release/Estimate-{id}.tex")]
public Estimate Estimate(long id)
Route("estimate-{id}.tex")]
public ViewResult Estimate(long id)
{
var estimate = _context.Estimates.Include(x=>x.Query).
Include(x=>x.Query.Client).FirstOrDefault(x=>x.Id==id);
var adc = estimate.Query.Client.UserName;
return estimate;
var estimate = _context.Estimates.Include(x=>x.Query)
.Include(x=>x.Query.Client)
.Include(x=>x.Query.PerformerProfile)
.Include(x=>x.Query.PerformerProfile.OrganizationAddress)
.Include(x=>x.Query.PerformerProfile.Performer)
.Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id);
// var poa = estimate.Query.PerformerProfile.OrganizationAddress;
// var adc = estimate.Query.Client.UserName;
ViewBag.From = estimate.Query.PerformerProfile.Performer;
ViewBag.To = estimate.Query.Client;
Response.ContentType = "text/x-tex";
// estimate.Query.Client.PostalAddress.
return View("Estimate.tex", estimate);
}
}
}