WIP estimate tex
This commit is contained in:
@ -32,7 +32,10 @@ namespace Yavsc.Controllers
|
||||
public IActionResult Index()
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
return View(_context.Estimates.Where(
|
||||
return View(_context.Estimates.Include(e=>e.Query)
|
||||
.Include(e=>e.Query.PerformerProfile)
|
||||
.Include(e=>e.Query.PerformerProfile.Performer)
|
||||
.Where(
|
||||
e=>e.OwnerId == uid || e.ClientId == uid
|
||||
).ToList());
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user