Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RealStateRegistryInterestPopularContract realStateRegistryInterestPopularContract = db.RealStateRegistryInterestPopularContracts.Find(id);

            db.RealStateRegistryInterestPopularContracts.Remove(realStateRegistryInterestPopularContract);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit(RealStateRegistryInterestPopularContract realStateRegistryInterestPopularContract)
 {
     if (ModelState.IsValid)
     {
         db.Entry(realStateRegistryInterestPopularContract).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(realStateRegistryInterestPopularContract));
 }
Пример #3
0
        public ActionResult Create(RealStateRegistryInterestPopularContract realStateRegistryInterestPopularContract)
        {
            if (ModelState.IsValid)
            {
                db.RealStateRegistryInterestPopularContracts.Add(realStateRegistryInterestPopularContract);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(realStateRegistryInterestPopularContract));
        }
Пример #4
0
        // GET: RealStateRegistryInterestPopularContracts/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RealStateRegistryInterestPopularContract realStateRegistryInterestPopularContract = db.RealStateRegistryInterestPopularContracts.Find(id);

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