Пример #1
0
        static Directory _getDirectory(SQLiteDataReader reader)
        {
            Directory d = new Directory();

            d.pk                  = Convert.ToInt16(reader["pk_directory"]);
            d.name                = Convert.ToString(reader["name"]);
            d.description         = Convert.ToString(reader["description"]);
            d.fk_parent_directory = DBGet.GetInt(reader["fk_parent_directory"]);
            d.color               = Convert.ToString(reader["color"]);
            try { d.files_count = Convert.ToInt16(reader["files_count"]); } catch { }
            return(d);
        }
Пример #2
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);
        }
Пример #3
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);
        }