?? postinfo.cs
字號(hào):
namespace ASPNET.StarterKit.Communities.Discuss {
using System;
using System.Data.SqlClient;
//*********************************************************************
//
// PostInfo Class
//
// Represents all information about a particular post.
//
//*********************************************************************
public class PostInfo : ContentInfo {
string _bodyText = String.Empty;
string _lastCommentUsername = String.Empty;
bool _isPinned = false;
bool _isAnnouncement = false;
bool _isLocked = false;
//*********************************************************************
//
// PostInfo Constructor
//
// Initializes post information from a SqlDataReader.
//
//*********************************************************************
public PostInfo(SqlDataReader dr) : base(dr) {
_isPinned = (bool)dr["Discuss_IsPinned"];
_isAnnouncement = (bool)dr["Discuss_IsAnnouncement"];
_isLocked = (bool)dr["Discuss_IsLocked"];
if (dr["LastCommentUsername"] != DBNull.Value)
_lastCommentUsername = (string)dr["LastCommentUsername"];
if (dr["Discuss_BodyText"] != DBNull.Value)
_bodyText = (string)dr["Discuss_BodyText"];
}
//*********************************************************************
//
// IsPinned Property
//
// Pinned posts always appear at top.
//
//*********************************************************************
public bool IsPinned {
get {return _isPinned; }
set {_isPinned = value; }
}
//*********************************************************************
//
// IsAnnouncement Property
//
// Announcements appear with a !.
//
//*********************************************************************
public bool IsAnnouncement {
get {return _isAnnouncement; }
set {_isAnnouncement = value; }
}
//*********************************************************************
//
// IsLocked Property
//
// Locked posts cannot have replies.
//
//*********************************************************************
public bool IsLocked {
get {return _isLocked; }
set {_isLocked = value; }
}
//*********************************************************************
//
// LastCommentUsername Property
//
// Represents the username of the last person to add a comment.
//
//*********************************************************************
public string LastCommentUsername {
get {return _lastCommentUsername;}
set {_lastCommentUsername = value;}
}
//*********************************************************************
//
// BodyText Property
//
// Represents the content of an post.
//
//*********************************************************************
public string BodyText {
get {return _bodyText;}
set {_bodyText = value;}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -