Exemplo n.º 1
0
 protected override void MappingData(System.Data.Common.DbDataReader reader)
 {
     _id          = (Guid)reader["ClipNewId"];
     _name        = (string)reader["ClipNewName"];
     _dateUpload  = (DateTime)reader["DateUpload"];
     _link        = (string)reader["Link"];
     _description = (string)reader["Description"];
     _isPublish   = (bool)reader["IsPublish"];
     _folder      = new FolderClipNew()
     {
         Id = (Guid)reader["FolderId"]
     };
 }
Exemplo n.º 2
0
        public static ClipNewCollection GetClipNewCollection(FolderClipNew folder)
        {
            Database          database = new Database(ConnectionStringName);
            ClipNewCollection result   = new ClipNewCollection();

            using (DbConnection connection = database.GetConnection())
            {
                DbCommand command = database.GetCommand();
                command.CommandText = "select * from ClipNew where FolderId='" + folder.Id + "' order by DateUpload desc";
                command.CommandType = System.Data.CommandType.Text;
                command.Connection  = connection;
                connection.Open();
                DbDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    ClipNew item = new ClipNew(reader);
                    result.Add(item);
                }
            }
            return(result);
        }
Exemplo n.º 3
0
 public FolderClipNewArgs(FolderClipNew Album, bool isEdit)
 {
     _folder = Album;
     _isEdit = isEdit;
 }