Пример #1
0
        //
        // GET: /Directory/Edit/5
        public ActionResult Edit(long id = 0)
        {
            var directoryVM = DirectoryViewModel.CreateViewModel((GetDirectory())
                                                                 .Find(x => x.Id == id));

            if (directoryVM == null)
            {
                return(HttpNotFound());
            }
            return(View(directoryVM));
        }
Пример #2
0
        //
        // GET: /Directory/Delete/5
        public ActionResult Delete(long parentId, long id)
        {
            var directoryVM = DirectoryViewModel.CreateViewModel((GetDirectory()).Find(x => x.Id == id));

            if (directoryVM == null)
            {
                return(HttpNotFound());
            }
            _directoryRepository.DeleteDirectory(id);
            return(ReturnToDetails(parentId));
        }