Exemplo n.º 1
0
        public ActionResult Album(string DropDownList, string Submit, AlbumViewModel avm)
        {
            //If the go button was pushed and the dropdown was delete
            if (Submit != null && DropDownList.Equals("Delete"))
            {
                //Call Delete Method
                DeleteImage deleteImage = new DeleteImage();
                deleteImage.deleteMultipleImages(Request, Server);
                DeleteFolder deleteFolder = new DeleteFolder();
                deleteFolder.deleteFolder(Request, Server);
            }
            if (Submit != null && DropDownList.Equals("Move"))
            {

            }
            // Recreate the grid tables
            AlbumGrid ag = new AlbumGrid(dbContext);
            avm.AlbumGridTable = ag.CreateTable(avm.FolderID);

                /*
            AlbumViewModel avm = new AlbumViewModel
            {
                AlbumGridTable = (ag.CreateTable(folderID)),
                InFolderID = f.getParentID(folderID).ToString()
            };
                 * */

            //Re-load the view
            return View(avm);
        }
Exemplo n.º 2
0
        //
        // GET: /Home/AlbumTree
        public ActionResult Album(int? folderID = null)
        {
            var InFolderId = (from f in dbContext.Folders
                             where f.FolderID == folderID
                             select f.InFolderID).SingleOrDefault();

            AlbumGrid ag = new AlbumGrid(dbContext);
            AlbumViewModel avm = new AlbumViewModel
            {
                AlbumGridTable = (ag.CreateTable(folderID)),
                FolderID = folderID,
                InFolderID = InFolderId
            };

            return View(avm);
        }