Beispiel #1
0
        //[Authorize(Roles = "Teacher")]
        public ActionResult Schedule(ScheduleViewModel svm)
        {
            svm.TutorId = Convert.ToInt32(Session["tutorid"].ToString());
            svm.Status  = "Open";


            scdb.InsertSchedule(svm);

            var sc = scdb.GetAllScheduleByTeacherid(Convert.ToInt32(Session["tutorid"].ToString()));

            return(PartialView("_ListSchedule", sc));
        }
Beispiel #2
0
 public JsonResult Add(ScheduleViewModel sch)
 {
     sch.TutorId = Convert.ToInt32(Session["tutorid"].ToString());
     sch.Status  = "Open";
     return(Json(scb.InsertSchedule(sch), JsonRequestBehavior.AllowGet));
 }