Ejemplo n.º 1
0
 public ActionResult File()
 {
     if (loginStatus() == false)
     {
         return Redirect("Login");
     }
    FileModel model = new FileModel();
    FileEntity[] fArray = model.getFiles(0, model.getTheNumberOfFile());
    ViewBag.fileList = fArray;
     return View();
 }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            int sid = getSid();
            if (sid == -1)
            {
                return Redirect("/Index/Index");
            }
            AnnouncementModel announceModel = new AnnouncementModel();
            ExamModel examModel = new ExamModel();
            FileModel fileModel = new FileModel();

            ViewBag.announcement = announceModel.getAnnouncements(0, 3);
            ViewBag.exam = examModel.getAvailableExam().Take(3);
            ViewBag.file = fileModel.getFiles(0, 3);
            assignTitle();
            return View();
        }
Ejemplo n.º 3
0
 public ActionResult File(int start=0,int size=10)
 {
     int sid = getSid();
     if (sid == -1)
     {
         return Redirect("/Index/Index");
     }
     var model = new FileModel();
     ViewBag.count = model.getTheNumberOfFile();
     ViewBag.data = model.getFiles(0, ViewBag.count);
     ViewBag.size = size;
     assignTitle();
     return View();
 }