public ActionResult DeleteConfirmed(int id) { ApplySchedule applySchedule = db.ApplySchedules.Find(id); db.ApplySchedules.Remove(applySchedule); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "applyScheduleID,applyDayofweek,applyScheduleTime,applicationID")] ApplySchedule applySchedule) { if (ModelState.IsValid) { db.Entry(applySchedule).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.applicationID = new SelectList(db.Applications, "applicationID", "applicationLevel", applySchedule.applicationID); return(View(applySchedule)); }
public ActionResult Create([Bind(Include = "ApplyScheduleID,ApplyDayofweek,ApplyScheduleTime,ApplicationID")] ApplySchedule applySchedule) { if (ModelState.IsValid) { db.ApplySchedules.Add(applySchedule); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ApplicationID = new SelectList(db.Applications, "ApplicationID", "ApplicationLevel", applySchedule.ApplicationID); return(View(applySchedule)); }
// GET: ApplySchedule/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ApplySchedule applySchedule = db.ApplySchedules.Find(id); if (applySchedule == null) { return(HttpNotFound()); } return(View(applySchedule)); }
// GET: ApplySchedule/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ApplySchedule applySchedule = db.ApplySchedules.Find(id); if (applySchedule == null) { return(HttpNotFound()); } ViewBag.applicationID = new SelectList(db.Applications, "applicationID", "applicationLevel", applySchedule.applicationID); return(View(applySchedule)); }