コード例 #1
0
        public ActionResult InstructorAccountList()
        {
            InstructorBusiness InsBO = new InstructorBusiness();
            var Model = InsBO.GetAllInstructor().OrderByDescending(ins => ins.InstructorID);

            return(View(Model));
        }
コード例 #2
0
        public AccountController()
        {
            RSMEntities db = new RSMEntities();

            AccBO   = new AccountBusiness(db);
            StaffBO = new StaffBusiness(db);
            InsBO   = new InstructorBusiness(db);
            StuBO   = new StudentBusiness(db);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public ActionResult Create(Instructor instructor)
 {
     try
     {
         // TODO: Add insert logic here
         InstructorBusiness.Add(instructor);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
コード例 #5
0
ファイル: Task.cs プロジェクト: conanak99/roll-system-mobile
        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.");
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        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 }));
            }
        }
コード例 #8
0
        //
        // GET: /Subject/

        public InstructorsController()
        {
            InsBO     = new InstructorBusiness();
            slFactory = new SelectListFactory();
        }
コード例 #9
0
        // GET: Instructor
        public ActionResult Index()
        {
            var lista = InstructorBusiness.GetInstructorList();

            return(View(lista));
        }
コード例 #10
0
 public InstructorController()
 {
     InsBO  = new InstructorBusiness();
     AccBO  = new AccountBusiness();
     RollBO = new RollCallBusiness();
 }