예제 #1
0
        public ActionResult Edit(TypeOfClasses typeOfClasses)
        {
            db.Entry(typeOfClasses).State = EntityState.Modified;
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        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
     });