public ActionResult EditClass(int id) { ViewBag.ModifiedBy = User.Identity.GetUserName(); Models.oprEntities db = new oprEntities(); ClassesTable edata = db.ClassesTables.Find(id); return(View(edata)); }
public ActionResult DeleteClass(int id) { Models.oprEntities db = new oprEntities(); ClassesTable classdt = db.ClassesTables.Find(id); classdt.IsDeleted = true; db.Entry(classdt).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
private void OnYearOfStudyChanged() { if (YearOfStudy == null) { return; } TableHeader = YearOfStudy.ToString(); _classesTable = Project.ClassesSchedule.GetClassesTable(YearOfStudy); _titlesMarkup = new TitlesMarkup(_classesTable.Groups); InitializeTitles(); InitLectureCards(); }