예제 #1
0
        public List <NoteDO> Fetch()
        {
            NotesDAL      dal         = new NotesDAL();
            List <NoteDO> listNoteDOs = dal.Fetch();

            return(listNoteDOs);
        }
예제 #2
0
        public List <NoteDO> Fetch(string query)
        {
            NotesDAL      dal         = new NotesDAL();
            List <NoteDO> listNoteDOs = dal.Fetch(query);

            return(listNoteDOs);
        }
예제 #3
0
        public NoteDO Save(string note)
        {
            NotesDAL dal       = new NotesDAL();
            NoteDO   savedNote = dal.Save(note);

            return(savedNote);
        }
예제 #4
0
        public NoteDO Fetch(int id)
        {
            NotesDAL dal    = new NotesDAL();
            NoteDO   result = dal.Fetch(id);

            return(result);
        }
예제 #5
0
        public ActionResult Pin(Note note)
        {
            note.IsMarked = !note.IsMarked;
            NotesDAL.Update(note);

            return(RedirectToAction("Index"));
        }
예제 #6
0
        public ActionResult Index(NoteRequest request)
        {
            var notes = NotesDAL.Retrieve(request);

            ViewBag.Title = "Notes";

            return(View(notes));
        }
예제 #7
0
        public ActionResult Save(Note note)
        {
            if (note.Id == 0)
            {
                NotesDAL.Create(note);
            }
            else
            {
                NotesDAL.Update(note);
            }

            return(RedirectToAction("Index"));
        }
예제 #8
0
        public ActionResult Delete(int id)
        {
            NotesDAL.Delete(id);

            return(RedirectToAction("Index"));
        }