📄 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 + -