public ActionResult DeleteConfirmed(int id)
        {
            STGConfig sTGConfig = db.STGConfig.Find(id);

            db.STGConfig.Remove(sTGConfig);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,PopulationSize,EpocheSize,NumberOfLessonToPositioning,BottomBorderOfBestSlots,TopBorderOfBestSlots,ProbabilityOfMutation")] STGConfig sTGConfig)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sTGConfig).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sTGConfig));
 }
        private STGCfg getSTGCfg(Schools school)
        {
            STGConfig c = school.STGConfig;

            return(new STGCfg(c.PopulationSize,
                              c.EpocheSize,
                              c.NumberOfLessonToPositioning,
                              c.BottomBorderOfBestSlots,
                              c.TopBorderOfBestSlots,
                              c.ProbabilityOfMutation));
        }
        // GET: STGConfigs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            STGConfig sTGConfig = db.STGConfig.Find(id);

            if (sTGConfig == null)
            {
                return(HttpNotFound());
            }
            return(View(sTGConfig));
        }