예제 #1
0
        public ActionResult LecturerLessonListPartial(string fromDate, string toDate, string id)
        {
            Lecturer lecturer = new Lecturer();

            lecturer.id = id;


            if (IsValidDate(fromDate))
            {
                lecturer.fromDate = Convert.ToDateTime(fromDate);
            }

            if (IsValidDate(toDate))
            {
                lecturer.toDate = Convert.ToDateTime(toDate);
            }


            CollegeWS.College WS = new CollegeWS.College();
            var sesId            = utils.GetSesId();

            lecturer.name     = WS.GetLecturerName(sesId, lecturer.id);
            lecturer.logoLink = WS.GetCollegeLogo(sesId);


            lecturer.lecturerLessons = WS.GetLecturerTimeTable(sesId, lecturer.id, lecturer.fromDate, lecturer.toDate);

            return(PartialView("_LecturerLessonListPartial", lecturer));
        }
예제 #2
0
        public ActionResult LecturerLessonList(string id)
        {
            Lecturer lecturer = new Lecturer();

            lecturer.fromDate = DateTime.Now;

            lecturer.id     = id;
            lecturer.toDate = DateTime.Now.AddDays(7);
            CollegeWS.College WS = new CollegeWS.College();
            var sesId            = utils.GetSesId();

            lecturer.lecturerLessons = WS.GetLecturerTimeTable(sesId, lecturer.id, lecturer.fromDate, lecturer.toDate);
            lecturer.name            = WS.GetLecturerName(sesId, lecturer.id);
            lecturer.logoLink        = WS.GetCollegeLogo(sesId);


            return(View("LecturerLessonList", lecturer));
        }