コード例 #1
0
        static File _getFile(DataRow row)
        {
            File f = new File();

            f.pk     = Convert.ToInt16(row["pk_file"]);
            f.name   = Convert.ToString(row["name"]);
            f.ext    = Convert.ToString(row["ext"]);
            f.length = Convert.ToInt32(row["length"]);
            //f.file = (byte[])row["file"]; //avoiding blob file loading to increase speed
            f.description    = Convert.ToString(row["description"]);
            f.creation_date  = DBGet.GetDateTime(row["creation_date"]);
            f.last_edit_date = DBGet.GetDateTime(row["last_edit_date"]);
            f.fk_directory   = DBGet.GetInt(row["fk_directory"]);
            return(f);
        }
コード例 #2
0
        static File _getFile(SQLiteDataReader reader)
        {
            File f = new File();

            f.pk             = Convert.ToInt16(reader["pk_file"]);
            f.name           = Convert.ToString(reader["name"]);
            f.ext            = Convert.ToString(reader["ext"]);
            f.length         = Convert.ToInt32(reader["length"]);
            f.file           = (byte[])reader["file"];
            f.description    = Convert.ToString(reader["description"]);
            f.creation_date  = DBGet.GetDateTime(reader["creation_date"]);
            f.last_edit_date = DBGet.GetDateTime(reader["last_edit_date"]);
            f.fk_directory   = DBGet.GetInt(reader["fk_directory"]);
            return(f);
        }