public FileInfoSmall(MeFileInfoSmall info) { InitializeComponent(); idFile = info.idFile; tBoxFilename.Text = info.Name; tBoxFileType.Text = info.Type; }
List <MeFileInfoSmall> loadMeFileInfo() { var ret = new List <MeFileInfoSmall>(); cmdFiles.Parameters[0].Value = idMe; string sStoragePath = FileStorage.GetStoragePath(idMe); try { mng.Open(); SqlDataReader rdr = cmdFiles.ExecuteReader(); string name; string type; int idFile; while (rdr.Read()) { name = sStoragePath + @"\" + (string)rdr["filename"]; type = (string)rdr["typeDesc"]; idFile = (int)rdr["idFile"]; var fi = new MeFileInfoSmall(idFile, name, type); ret.Add(fi); } rdr.Close(); return(ret); } finally { mng.Close(); } }