public ActionResult DeleteConfirmed(int id)
        {
            OutageManager outageManager = new OutageManager();

            outageManager.DeleteOutage(id);
            return(RedirectToAction("Index"));
        }
        public ActionResult Save(Outage outage)
        {
            if (ModelState.IsValid)
            {
                OutageManager outageManager = new OutageManager();

                if (outageManager.AddOutage(outage))
                {
                    return(RedirectToAction("Index"));
                }
            }
            return(View(outage));
        }
        // GET: Outages/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OutageManager outageManager = new OutageManager();
            Outage        outage        = outageManager.GetOutage(id);

            if (outage == null)
            {
                return(HttpNotFound());
            }
            return(View(outage));
        }
        public ActionResult Edit([Bind(Include = "ID,ApplicationID,StartDate,EndDate,IncidentNumber,Impact,Description,Component")] Outage outage)
        {
            if (ModelState.IsValid)
            {
                OutageManager outageManager = new OutageManager();

                if (outageManager.EditOutage(outage))
                {
                    return(RedirectToAction("Index"));
                }


                return(RedirectToAction("Index"));
            }
            // ViewBag.ApplicationID = new SelectList(db.Applications, "ID", "ApplicationName", outage.ApplicationID);
            return(View(outage));
        }
        // GET: Outages/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OutageManager outageManager = new OutageManager();
            Outage        outage        = outageManager.GetOutage(id);

            if (outage == null)
            {
                return(HttpNotFound());
            }
            ApplicationManager appManager = new ApplicationManager();

            ViewBag.ApplicationID = new SelectList(appManager.GetApplicationList(), "ID", "ApplicationName", outage.ApplicationID);
            return(View(outage));
        }