public ActionResult DeleteConfirmed(int id)
        {
            TrainingSchemeModels trainingSchemeModels = db.TrainingSchemeModels.Find(id);

            db.TrainingSchemeModels.Remove(trainingSchemeModels);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,TrainingSchemeName,SeasonPart")] TrainingSchemeModels trainingSchemeModels)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trainingSchemeModels).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SeasonPart = new SelectList(db.SeasonParts, "Id", "SeasonPartName", trainingSchemeModels.SeasonPart);
     return(View(trainingSchemeModels));
 }
        // GET: TrainingSchemeModels/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TrainingSchemeModels trainingSchemeModels = db.TrainingSchemeModels.Find(id);

            if (trainingSchemeModels == null)
            {
                return(HttpNotFound());
            }
            return(View(trainingSchemeModels));
        }
        // GET: TrainingSchemeModels/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TrainingSchemeModels trainingSchemeModels = db.TrainingSchemeModels.Find(id);

            if (trainingSchemeModels == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SeasonPart = new SelectList(db.SeasonParts, "Id", "SeasonPartName", trainingSchemeModels.SeasonPart);
            return(View(trainingSchemeModels));
        }