?? downloadinfo.cs
字號:
namespace ASPNET.StarterKit.Communities.Downloads {
using System;
using System.Data.SqlClient;
//*********************************************************************
//
// DownloadInfo Class
//
// Represents all information about a particular downloadable file.
//
//*********************************************************************
public class DownloadInfo : ContentInfo {
int _fileSize;
string _fullDescription;
int _downloadCount;
//*********************************************************************
//
// DownloadInfo Constructor
//
// Initializes download information from a SqlDataReader.
//
//*********************************************************************
public DownloadInfo(SqlDataReader dr) : base(dr) {
// Populate required fields
_fileSize = (int)dr["Download_FileSize"];
_downloadCount = (int)dr["Download_DownloadCount"];
// Populate optional fields
if (dr["Download_FullDescription"] != DBNull.Value)
_fullDescription = (string)dr["Download_FullDescription"];
}
//*********************************************************************
//
// FileSize Property
//
// Represents the file size of the download.
//
//*********************************************************************
public int FileSize {
get {return _fileSize;}
set {_fileSize = value;}
}
//*********************************************************************
//
// FullDescription Property
//
// Represents the full description of the download.
//
//*********************************************************************
public string FullDescription {
get {return _fullDescription;}
set {_fullDescription = value;}
}
//*********************************************************************
//
// DownloadCount Property
//
// Represents the number of times the file has been downloaded.
//
//*********************************************************************
public int DownloadCount {
get {return _downloadCount;}
set {_downloadCount = value;}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -