Example #1
0
        public ActionResult tBulletinDeleteConfirmed(int id)
        {
            tBulletin tBulletin = db.tBulletin.Find(id);

            db.tBulletin.Remove(tBulletin);
            db.SaveChanges();
            return(RedirectToAction("Bulletin", "Home", new { area = "" }));
        }
Example #2
0
 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));
 }
Example #3
0
        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));
        }
Example #4
0
        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));
        }
Example #5
0
        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));
        }