コード例 #1
0
        public async Task <ActionResult> Detalhes(string arquivo)
        {
            if (VerificarLogin())
            {
                List <ToqueModel> toques = LerToquesCSV();
                ToqueModel        toque  = new ToqueModel();
                foreach (var item in toques)
                {
                    if (arquivo == item.Arquivo)
                    {
                        toque = item;
                        break;
                    }
                }

                string file = arquivo + ".wav";
                string dir  = Path.Combine(Server.MapPath("~/Musicas/"));

                await FTPService.DownloadFileSpec(dir, file);

                return(View(toque));
            }
            else
            {
                return(RedirectToAction("Login"));
            }
        }