// GET: StudentHD/Register public ActionResult Index() { var session = (UserLogin)Session[CommonConstants.USER_SESSION]; int idStd = service.FindStudent(session.UserName); var model = new DetailScheduleStudent(); model.listSchedule = service.GetListSchedule(idStd); model.listCar = service2.GetListAllCar(); model.listStudent = service2.GetListAllStudent(); model.listTeacher = service2.GetListAllTeacher(); return(View("Index", model)); }
public ActionResult Index(int hour = 0, int day = 0, int month = 0, int year = 0, int idCar = 0, int idStd = 0, int idTea = 0) { var model = new DetailScheduleStudent(); if (hour < 0 || hour > 4 || day < 0 || day > 30 || month < 0 || month > 12 || year < 2016 || year > 2019 || idCar < 0 || idStd < 0 || idTea < 0) { model.listSchedule = service.listRepost(0, 0, 0, 0, 0, 0, 0); } model.listSchedule = service.listRepost(hour, day, month, year, idCar, idStd, idTea); model.listCar = service1.GetListAllCar(); model.listStudent = service2.GetListAllStudent(); model.listTeacher = service3.GetListAllTeachers(); model.hour = hour; model.day = day; model.month = month; model.year = year; return(View(model)); }
public ActionResult Detail(int hour = 0, int day = 0, int month = 0, int year = 0) { if (hour < 0 || hour > 4 || day < 0 || day > 30 || month < 0 || month > 12 || year < 0 || year > 2019) { var ssModel = new ClassModel(); ssModel.schedule = service.GetListManySchedule(null, 0, 0, month, year, 0, 0, 0, 0); ssModel.month = month; ssModel.year = year; return(View("Index", ssModel)); } var model = new DetailScheduleStudent(); model.listSchedule = service.GetListManySchedule(null, hour, day, month, year, 0, 0, 0, 0); model.listCar = service.GetListAllCar(); model.listStudent = service.GetListAllStudent(); model.listTeacher = service.GetListAllTeacher(); model.hour = hour; model.day = day; model.month = month; model.year = year; return(View("Detail", model)); }