Exemplo n.º 1
0
        public ActionResult SearchNotes(NoteModel Nm)
        {
            Nm.IsItSearchAndFilter = true;
            ListNotes Ln = NotesRepository.GetAllAvailableNotes(Nm);

            return(PartialView("_ListNotes", Ln));
        }
Exemplo n.º 2
0
        public ActionResult SearchNotes()
        {
            ViewBag.Title = "SearchNotes";

            if (Request.IsAuthenticated && Session["UserID"] == null)
            {
                return(RedirectToAction("Login", "Authentication"));
            }
            else if (Request.IsAuthenticated)
            {
                ViewBag.Authorized = true;
            }


            SearchNotesModel FilterData = new SearchNotesModel();

            FilterData.Type       = NotesFilters.Types();
            FilterData.Category   = NotesFilters.Categories();
            FilterData.Country    = NotesFilters.Countries();
            FilterData.Rating     = NotesFilters.Ratings();
            FilterData.University = NotesFilters.Universities();
            FilterData.Course     = NotesFilters.Courses();
            ViewBag.FilterData    = FilterData;

            ListNotes Ln = NotesRepository.GetAllAvailableNotes(new NoteModel()
            {
                IsItSearchAndFilter = false
            });

            ViewBag.LoadAjaxJS = true;
            ViewBag.NotesData  = Ln;
            return(View());
        }