public ActionResult InstructorAccountList() { InstructorBusiness InsBO = new InstructorBusiness(); var Model = InsBO.GetAllInstructor().OrderByDescending(ins => ins.InstructorID); return(View(Model)); }
public AccountController() { RSMEntities db = new RSMEntities(); AccBO = new AccountBusiness(db); StaffBO = new StaffBusiness(db); InsBO = new InstructorBusiness(db); StuBO = new StudentBusiness(db); }
public RollCallController() { RSMEntities DB = new RSMEntities(); RollBO = new RollCallBusiness(DB); SlFactory = new SelectListFactory(DB); ClaBO = new ClassBusiness(DB); SubBO = new SubjectBusiness(DB); StuBO = new StudentBusiness(DB); InsBO = new InstructorBusiness(DB); SeBO = new SemesterBusiness(DB); MjBO = new MajorBusiness(DB); }
public ActionResult Create(Instructor instructor) { try { // TODO: Add insert logic here InstructorBusiness.Add(instructor); return(RedirectToAction("Index")); } catch { return(View()); } }
public void Execute() { InstructorBusiness InsBO = new InstructorBusiness(); CalendarBusiness CalenBO = new CalendarBusiness(); //Tim nhung instructor co API Token List <Instructor> InstructorsWithAPI = InsBO.Find(ins => ins.ApiToken != null); foreach (var Instructor in InstructorsWithAPI) { CalenBO.SyncInstructorCalendar(Instructor.InstructorID); } SimpleLog.Info("Calendar for " + InstructorsWithAPI.Count + " instructors synced."); }
public ActionResult SessionReport(int InstructorID, int SelectedMonth, int SelectedYear) { InstructorBusiness InsBO = new InstructorBusiness(); var Ins = InsBO.GetInstructorByID(InstructorID); DateTime SelectedTime = new DateTime(SelectedYear, SelectedMonth, 1); String FileName = InstructorID + "_" + Ins.Fullname.NonUnicode() + "_" + SelectedTime.ToString("yyyy_MMMM") + ".xlsx"; String FilePath = Server.MapPath("~/Content/Temp/" + FileName); InsBO.CreateSessionReport(InstructorID, SelectedTime, FilePath); return(File(FilePath, ExcelMimeType, FileName)); }
public ActionResult Login(string Username, string Password) { AccountBusiness AccBO = new AccountBusiness(); InstructorBusiness InsBO = new InstructorBusiness(); User user = AccBO.CheckLogin(Username, Password); if (user == null) { return(Json(new { message = "Invalid" })); } else { Instructor AuthorizedInstructor = InsBO.GetInstructorByUserID(user.UserID); return(Json(new { message = "Success", instructorName = AuthorizedInstructor.Fullname, instructorID = AuthorizedInstructor.InstructorID })); } }
// // GET: /Subject/ public InstructorsController() { InsBO = new InstructorBusiness(); slFactory = new SelectListFactory(); }
// GET: Instructor public ActionResult Index() { var lista = InstructorBusiness.GetInstructorList(); return(View(lista)); }
public InstructorController() { InsBO = new InstructorBusiness(); AccBO = new AccountBusiness(); RollBO = new RollCallBusiness(); }