public ActionResult Edit(TypeOfClasses typeOfClasses) { db.Entry(typeOfClasses).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create(TypeOfClasses typeOfClasses) { db.TypeOfClasses.Add(typeOfClasses); db.SaveChanges(); return(RedirectToAction("Index")); }
public Color GetScheduleItemColor(TypeOfClasses typeOfClasses) { return(typeOfClasses switch { TypeOfClasses.Lecture => Color.Danger, TypeOfClasses.Exercises => Color.Success, TypeOfClasses.Seminar => Color.Warning, TypeOfClasses.Laboratories => Color.Primary, TypeOfClasses.Project => Color.Secondary, TypeOfClasses.Other => Color.Info, _ => Color.Success });