public ActionResult CreateCourseNotice(coursenotice notice)
 {
     if ((string)Session["user"] != null)
     {
         data.coursenotice.Add(notice);
         data.SaveChanges();
         return(RedirectToAction("TeacherIndex"));
     }
     return(RedirectToAction("Login", "User"));
 }
        public ActionResult CreateCourseNotice(coursenotice note)
        {
            //Debug.WriteLine(grade.quiz2);
            data.coursenotice.Add(note);
            //   Debug.WriteLine(grade.quiz1);
            data.SaveChanges();


            return(View("TeacherIndex"));
        }