public ActionResult DeleteConfirmed(int id) { welcomeNoticeModels welcomeNoticeModels = db.welcomeNoticeModels.Find(id); db.welcomeNoticeModels.Remove(welcomeNoticeModels); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,WelcomeNotice")] welcomeNoticeModels welcomeNoticeModels) { if (ModelState.IsValid) { db.Entry(welcomeNoticeModels).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(welcomeNoticeModels)); }
public ActionResult Create([Bind(Include = "ID,WelcomeNotice")] welcomeNoticeModels welcomeNoticeModels) { if (ModelState.IsValid) { db.welcomeNoticeModels.Add(welcomeNoticeModels); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(welcomeNoticeModels)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } welcomeNoticeModels welcomeNoticeModels = db.welcomeNoticeModels.Find(id); if (welcomeNoticeModels == null) { return(HttpNotFound()); } return(View(welcomeNoticeModels)); }