IDeltaVItem.CreatorDisplayName Property

IT Hit WebDAV for .NET

Display name of the user that created this item.

[Visual Basic]
Property CreatorDisplayName As String
[C#]
string CreatorDisplayName {get; set;}

Property Value

String representing author name.

Remarks

This property contains a description of the creator of the resource that is suitable for presentation to a user. Can be used to indicate who created that version.

Example

public string CreatorDisplayName
{
    get
    {
        string creatorDisplayName;

        using (SqlConnection conn = new SqlConnection(fConnStr))
        {
            conn.Open();
            SqlCommand cmd = conn.CreateCommand();
            cmd.CommandText = "SELECT CreatorDisplayName FROM Version WHERE VersionId = @VersionId";
            cmd.Parameters.Add("@VersionId", SqlDbType.UniqueIdentifier).Value = this.VersionId;
            creatorDisplayName = (string)cmd.ExecuteScalar();
        }

        return creatorDisplayName;
    }
    set
    {
        using (SqlConnection conn = new SqlConnection(fConnStr))
        {
            conn.Open();
            SqlCommand cmd = conn.CreateCommand();
            cmd.CommandText = "UPDATE Version SET CreatorDisplayName = @CreatorDisplayName"
                              + " WHERE VersionId = @VersionId";

            cmd.Parameters.Add("@VersionId", SqlDbType.UniqueIdentifier).Value = this.VersionId;
            cmd.Parameters.Add("@CreatorDisplayName", SqlDbType.NVarChar).Value = value;
            cmd.ExecuteNonQuery();
        }
    }
}
 

See Also

IDeltaVItem Interface | ITHit.WebDAV.Server.DeltaV Namespace