示例#1
0
        public ActionResult FileActionDefault(SQLFileExplorerGetParams args)
        {
            SQLFileExplorerOperations sqlobj = new SQLFileExplorerOperations("FileExplorerConnection", "Product", "NameDetail");
            IEnumerable <SQLFileExplorerDirectoryContent> SelectedItems = null;

            if (args.SelectedItems != null)
            {
                var serializer = new JavaScriptSerializer();
                SelectedItems = (IEnumerable <SQLFileExplorerDirectoryContent>)serializer.Deserialize(args.SelectedItems.ToString(), typeof(IEnumerable <SQLFileExplorerDirectoryContent>));
            }
            switch (args.ActionType)
            {
            case "Download":
                sqlobj.Download(args.Path, args.Names, SelectedItems);
                break;

            case "GetImage":
                sqlobj.GetImage(args.Path, SelectedItems);
                break;
            }
            return(Json(""));
        }
示例#2
0
 public ActionResult GetImage(SQLFileExplorerGetParams args)
 {
     args.ActionType = "GetImage";
     return(FileActionDefault(args));
 }