示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ClosedBusinessInReview closedBusiness = db.ClosedBusinessesInReview.Find(id);

            db.ClosedBusinessesInReview.Remove(closedBusiness);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult Create([Bind(Include = "Id,Name,Address,DateClosed,CurrentStatus,ArticleLink,Img,Details,TotalMoneyOwed")] ClosedBusinessInReview closedBusiness)
        {
            if (ModelState.IsValid)
            {
                closedBusiness.Updated = DateTime.Now;
                db.ClosedBusinessesInReview.Add(closedBusiness);
                db.SaveChanges();
                return(RedirectToAction("Index", "Home"));
            }

            return(View(closedBusiness));
        }
示例#3
0
        // GET: ClosedBusinessInReview/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClosedBusinessInReview closedBusiness = db.ClosedBusinessesInReview.Find(id);

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