public ActionResult DeleteConfirmed(int id)
        {
            InstalledPowerOrganisation record = db.InstalledPowerOrganisation.Find(id);

            db.InstalledPowerOrganisation.Remove(record);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Organisation,BaseInstalledPower")] InstalledPowerOrganisation record)
 {
     if (ModelState.IsValid)
     {
         db.Entry(record).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(record));
 }
 public ActionResult Create([Bind(Include = "ID,Organisation,BaseInstalledPower")] InstalledPowerOrganisation record)
 {
     if (ModelState.IsValid)
     {
         db.InstalledPowerOrganisation.Add(record);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View("Index"));
 }
        // Detele - Delete a record
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InstalledPowerOrganisation record = db.InstalledPowerOrganisation.Find(id);

            if (record == null)
            {
                return(HttpNotFound());
            }
            return(View(record));
        }