Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public MaterialRequestModel(MaterialRequest order, Employee aConcernedEmployee, Employee anOrderedbyEmployee, Office anOffice)
  2.  
  3. public ActionResult Index()
  4. {
  5. IQueryable<MaterialRequest> query= DB.MaterialRequest
  6. .Where(m => m.MaterialStatusId == MatStatus.A9Cancelled || m.MaterialStatusId == MatStatus.A8Complete);
  7.  
  8. List<MaterialRequestModel> model= new List<MaterialRequestModel>();
  9. foreach (MaterialRequest req in query)
  10. {
  11. model.Add(new MaterialRequestModel(req, DB.Employees.Find(req.ConcernedEmployeeId), DB.Employees.Find(req.OrderedByEmployeeId), DB.Offices.Find(req.OfficeId)));
  12. }
  13. return View(model);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement