Beispiel #1
0
        public void loadFile(Tabla_Catalogo_FichaIdentificacionDTO oneFicha)
        {
            string pathToCreate = "~/Pacientes/" + oneFicha.Id_FichaIdentificacion;

            if (!Directory.Exists(Server.MapPath(pathToCreate)))
            {
                Directory.CreateDirectory(Server.MapPath(pathToCreate));
            }
            string[] fileEntries = Directory.GetFiles(Server.MapPath(pathToCreate));
            var      lFiles      = new List <FileDTO>();

            foreach (string fileName in fileEntries)
            {
                FileDTO oneFile = new FileDTO();
                oneFile.Nombre   = fileName.Remove(0, Server.MapPath(pathToCreate).Count() + 1);
                oneFile.Download = fileName;
                lFiles.Add(oneFile);
            }
            rptFiles.DataSource = lFiles;
            rptFiles.DataBind();
        }
        public void loadFile(Tabla_Catalogo_FichaIdentificacionDTO oneFicha)
        {
            string pathToCreate = "~/Pacientes/" + oneFicha.Id_FichaIdentificacion;
            if (!Directory.Exists(Server.MapPath(pathToCreate)))
            {
                Directory.CreateDirectory(Server.MapPath(pathToCreate));
            }
            string[] fileEntries = Directory.GetFiles(Server.MapPath(pathToCreate));
            var lFiles = new List<FileDTO>();

            foreach (string fileName in fileEntries)
            {
                FileDTO oneFile = new FileDTO();
                oneFile.Nombre = fileName.Remove(0, Server.MapPath(pathToCreate).Count() + 1);
                oneFile.Download = fileName;
                lFiles.Add(oneFile);
            }
            rptFiles.DataSource = lFiles;
            rptFiles.DataBind();
        }