您目前尚未登陆,请选择【登陆】或【注册
首页->博客论坛->博客源代码(课程设计,3层架构)>>App-Code/Comment.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:博客源代码(课程设计,3层架构)
当前文件:文件类型 MVCBlog/App_Code/Comment.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Data.SqlClient; 4using System.Collections.Generic; 5//using System.Data.OleDb; 6//留言类 7public class Comment 8{ 9 private string _id; 10 private string _gid; 11 private string _gcontent; 12 private string _gauthor; 13 private DateTime _gtime; 14 15 public string id 16 { 17 get { return this._id; } 18 set { this._id = value; } 19 } 20 public string gid 21 { 22 get { return this._gid; } 23 set { this._gid = value; } 24 } 25 public string gcontent 26 { 27 get { return this._gcontent; } 28 set { this._gcontent = value; } 29 } 30 public string gauthor 31 { 32 get { return this._gauthor; } 33 set { this._gauthor = value; } 34 } 35 public DateTime gtime 36 { 37 get { return this._gtime; } 38 set { this._gtime = value; } 39 } 40 41 42 public Comment() 43 { 44 // 45 // TODO: 在此处添加构造函数逻辑 46 // 47 } 48 public Comment(string aid,string comment) 49 { 50 this._id = aid; 51 this._gcontent =comment; 52 } 53 public Comment(SqlDataReader dr) 54 { 55 this._id =dr["id"].ToString(); 56 this._gid = dr["g_ID"].ToString(); 57 this._gcontent = dr["g_content"].ToString(); 58 this._gauthor = dr["g_author"].ToString(); 59 this._gtime =Convert.ToDateTime(dr["g_time"]); 60 } 61} 62
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:博客源代码(课程设计,3层架构)
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号