public ActionResult DeleteConfirmed(int id)
        {
            Writer_Season writer_Season = db.Writer_Seasons.Find(id);

            db.Writer_Seasons.Remove(writer_Season);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: Admin/Writer_Season/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Writer_Season writer_Season = db.Writer_Seasons.Find(id);

            if (writer_Season == null)
            {
                return(HttpNotFound());
            }
            return(View(writer_Season));
        }
 public ActionResult Edit([Bind(Include = "ID,Seasonid,Writerid,CreateDate,CreateUserID,UpdateDate,UpdateUserID")] Writer_Season writer_Season)
 {
     if (ModelState.IsValid)
     {
         User user = Session["AdminLogin"] as User;
         writer_Season.UpdateDate      = DateTime.Now;
         writer_Season.UpdateUserID    = user.ID;
         db.Entry(writer_Season).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Seasonid = new SelectList(db.Seasons, "ID", "SeasonName", writer_Season.Seasonid);
     ViewBag.Writerid = new SelectList(db.Writers, "ID", "Name", writer_Season.Writerid);
     return(View(writer_Season));
 }
        // GET: Admin/Writer_Season/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Writer_Season writer_Season = db.Writer_Seasons.Find(id);

            if (writer_Season == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Seasonid = new SelectList(db.Seasons, "ID", "SeasonName", writer_Season.Seasonid);
            ViewBag.Writerid = new SelectList(db.Writers, "ID", "Name", writer_Season.Writerid);
            return(View(writer_Season));
        }