Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            testDB testDB = db.testDBs.Find(id);

            db.testDBs.Remove(testDB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "id,Surname,Forename,TownlandStreet,DED,County,Age,Sex,Birthplace,Occupation,Religion,Literacy,IrishLanguage,RelationToHeadOfHousehold,MaritalStatus,SpecifiedIllness,Religion_ID,Lat,Long,AddressToGeoCode,HouseNo,AmountInHouse,OriginalCensusForm,LocationType")] testDB testDB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(testDB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(testDB));
 }
Esempio n. 3
0
        // GET: testDBs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            testDB testDB = db.testDBs.Find(id);

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