// GET: Installations/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Installation installation = db.Installations.Find(id);

            if (installation == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Statuses        = EnumHelpers.AsSelectList <InstallationPartStatus>();
            ViewBag.LabourStatuses  = EnumHelpers.AsSelectList <LabourStatus>();
            ViewBag.Units           = EnumHelpers.AsSelectList <TemporalUnit>();
            ViewBag.HasMissingParts = installation.MissingParts.Count() != 0;
            Membership.AddRecentInstallationToUser(User.Identity.GetUserName(), installation.Id);
            return(View(installation));
        }