public ActionResult tBulletinDeleteConfirmed(int id) { tBulletin tBulletin = db.tBulletin.Find(id); db.tBulletin.Remove(tBulletin); db.SaveChanges(); return(RedirectToAction("Bulletin", "Home", new { area = "" })); }
public ActionResult tBulletinEdit([Bind(Include = "fBu_ID,fBu_Date,fBC_ID,fBu_Title,fBu_Content")] tBulletin tBulletin) { if (ModelState.IsValid) { db.Entry(tBulletin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Bulletin", "Home", new { area = "" })); } ViewBag.fBC_ID = new SelectList(db.tBulletinClass, "fBC_ID", "fBC_Class", tBulletin.fBC_ID); return(View(tBulletin)); }
public ActionResult tBulletinCreate([Bind(Include = "fBu_ID,fBu_Date,fBC_ID,fBu_Title,fBu_Content")] tBulletin tBulletin) { if (ModelState.IsValid) { tBulletin.fBu_Date = DateTime.Now; db.tBulletin.Add(tBulletin); db.SaveChanges(); return(RedirectToAction("Bulletin", "Home", new { area = "" })); } ViewBag.fBC_ID = new SelectList(db.tBulletinClass, "fBC_ID", "fBC_Class", tBulletin.fBC_ID); return(View(tBulletin)); }
public ActionResult tBulletinDelete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tBulletin tBulletin = db.tBulletin.Find(id); if (tBulletin == null) { return(HttpNotFound()); } return(View(tBulletin)); }
public ActionResult tBulletinEdit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tBulletin tBulletin = db.tBulletin.Find(id); if (tBulletin == null) { return(HttpNotFound()); } ViewBag.fBC_ID = new SelectList(db.tBulletinClass, "fBC_ID", "fBC_Class", tBulletin.fBC_ID); return(View(tBulletin)); }