public ActionResult StudentLessonListPartial(string fromDate, string toDate, string id) { Student student = new Student(); student.id = id; if (IsValidDate(fromDate)) { student.fromDate = Convert.ToDateTime(fromDate); } if (IsValidDate(toDate)) { student.toDate = Convert.ToDateTime(toDate); } CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); student.name = WS.GetStudentsName(sesId, student.id); student.logoLink = WS.GetCollegeLogo(sesId); student.StudentLessons = WS.GetStudentsTimeTable(sesId, student.id, student.fromDate, student.toDate); return(PartialView("_StudentLessonListPartial", student)); }
public ActionResult OpenStudentInLesson(string courseNo, string lessonNo, string lessonDate) { 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(); DateTime lessonDateDt = DateTime.Now; if (IsValidDate(lessonDate)) { lessonDateDt = Convert.ToDateTime(lessonDate); } lecturer.studentInLesson = WS.GetStudentsInLesson(sesId, courseNo, Convert.ToInt32(lessonNo), lessonDateDt); lecturer.name = WS.GetLecturerName(sesId, lecturer.id); lecturer.logoLink = WS.GetCollegeLogo(sesId); return(RedirectToAction("StudentsInLessonList", lecturer)); }
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)); }
public ActionResult BtnloginClicked(string id) { CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); //WS.getstudentcom if (!WS.ValidIdNumber(id)) { return(JavaScript("window.alert('. תעודת זהות שהוזנה אינה במבנה תקין. אנא הזן שנית');")); } if (WS.LecturerIdNumberExist(sesId, id)) { if (string.IsNullOrEmpty(WS.GetLecturerMobileById(sesId, id))) { return(JavaScript("window.alert('. לא הוגדר טלפון נייד ברטיס שלך, יש לפנות למכללה לטיפול');")); } // return RedirectToAction("OpenStudentsLoginValidationPage", "CollegeLoginS"); var picture = WS.GetCollegeLogo(sesId); LogInScreenData logInScreenData = new LogInScreenData(); logInScreenData.logoLink = picture; Random rnd = new Random(); int code = 1000 + rnd.Next(8999); var mobileNumber = WS.GetLecturerMobileById(sesId, id); #if DEBUG mobileNumber = "0528692703"; #endif WS.Send_Sms_msg(sesId, mobileNumber, "קוד האימות שלך הוא: " + code.ToString()); logInScreenData.mobileValidationCode = code.ToString(); if (_validationCodesHashTable.ContainsKey(id)) { _validationCodesHashTable[id] = code.ToString(); } else { _validationCodesHashTable.Add(id, code.ToString()); } logInScreenData.id = id; //return PartialView("CollegeLoginSPartial", logInScreenData); return(RedirectToAction("OpenLecturerValidationPage", "CollegeLoginL", new { id = id })); // redirects to internal url } else { return(JavaScript("window.alert('. יש לפנות למכללה. תעודת זהות לא מופיעה במערכת');")); } }
// GET: CollegeLoginS public ActionResult OpenLecturesLoginPage() { CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); var picture = WS.GetCollegeLogo(sesId); LogInScreenData logInScreenData = new LogInScreenData(); logInScreenData.logoLink = picture; return(View("CollegeLoginL", logInScreenData)); }
public ActionResult OpenLecturerValidationPage(string id) { CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); var picture = WS.GetCollegeLogo(sesId); LogInScreenData logInScreenData = new LogInScreenData(); logInScreenData.logoLink = picture; logInScreenData.id = id; logInScreenData.mobileValidationCode = _validationCodesHashTable[id].ToString(); return(View("CollegeLoginLVald", logInScreenData)); }
public ActionResult SaveApproveHealthStatment(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(); WS.SaveLecturerHealthStatement(sesId, lecturer.id, DateTime.Now); return(View("LecturerHealthStatement", lecturer)); }
// GET: StudentTimeTable public ActionResult StudentLessonList(string id) { Student student = new Student(); student.fromDate = DateTime.Now; student.id = id; student.toDate = DateTime.Now.AddDays(7); CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); student.StudentLessons = WS.GetStudentsTimeTable(sesId, student.id, student.fromDate, student.toDate); student.name = WS.GetStudentsName(sesId, student.id); student.logoLink = WS.GetCollegeLogo(sesId); return(View("StudentLessonList", student)); }
public ActionResult BtnValidationloginClicked(string inputVcode, string mobileValidationCode, string id) { if (inputVcode != mobileValidationCode) { return(JavaScript("window.alert('. קוד אימות אינו נכון. אנא הזן קוד אימות שנית');")); } CollegeWS.College WS = new CollegeWS.College(); var sesId = utils.GetSesId(); var picture = WS.GetCollegeLogo(sesId); LogInScreenData logInScreenData = new LogInScreenData(); logInScreenData.logoLink = picture; return(RedirectToAction("LecturerLessonList", "LecturerTimeTable", new { id = id })); }
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)); }
public ActionResult OpenLecturerHealthStatement(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(); bool lecturerHasHealthStatement = WS.LecturerHasHealthStatement(sesId, lecturer.id, DateTime.Now); lecturer.name = WS.GetLecturerName(sesId, lecturer.id); lecturer.logoLink = WS.GetCollegeLogo(sesId); return(RedirectToAction("LecturerHealthStatement", lecturer)); }
public ActionResult LecturerHealthStatement(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(); bool lecturerHasHealthStatement = WS.LecturerHasHealthStatement(sesId, lecturer.id, DateTime.Now); if (lecturerHasHealthStatement) { return(JavaScript("window.alert('. הצהרת בריאות עבור יום נוכחי כבר נחתמה.אין צורך בחתימה נוספת');")); } lecturer.name = WS.GetLecturerName(sesId, lecturer.id); lecturer.logoLink = WS.GetCollegeLogo(sesId); lecturer.approveHealthStatmentId = false; return(View("LecturerHealthStatement", lecturer)); }
public static string GetSesId() { CollegeWS.College ws = new CollegeWS.College(); return(ws.GetSessionId(1573, "college", "", 1, false)); }