Asp.net源码专业站
首页->企业网站->中小企业网站系统前台源码(SmallBusinessStarterKit)>>App-Code/Catalog/Category.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:中小企业网站系统前台源码(SmallBusinessStarterKit)
当前文件:文件类型 SmallBusinessStarterKit/App_Code/Catalog/Category.cs[1K,2009-6-12 11:54:21]打开代码结构图
普通视图
		            
1using System; 2 3 4///<summary> 5/// 分类项 6/// 表示企业的产品类别,以便于企业组织他们的产品 7/// </summary> 8public class Category 9{ 10 private string _id; 11 private bool _visible; 12 private string _title; 13 private string _description; 14 private string _imageUrl; 15 private string _imageAltText; 16 17 public Category(string id, bool visible, string title) 18 { 19 if (String.IsNullOrEmpty(id)) throw new ArgumentException(Messages.CategoryIdUndefined); 20 if (String.IsNullOrEmpty(title)) throw new ArgumentException(Messages.CategoryTitleUndefined); 21 22 _id = id; 23 _visible = visible; 24 _title = title; 25 26 } 27 28 29 public string Id 30 { 31 get { return _id; } 32 } 33 34 public string Title 35 { 36 get { return String.IsNullOrEmpty(_title) ? String.Empty : _title; } 37 set 38 { 39 if (String.IsNullOrEmpty(value)) 40 throw new InvalidOperationException(Messages.ItemTitleIsNull); 41 _title = value; } 42 } 43 44 public bool Visible 45 { 46 get { return _visible; } 47 set { _visible = value; } 48 } 49 50 51 public string Description 52 { 53 get { return String.IsNullOrEmpty(_description) ? String.Empty : _description; } 54 set { _description= value; } 55 } 56 57 public string ImageUrl 58 { 59 get { return String.IsNullOrEmpty(_imageUrl) ? String.Empty : _imageUrl; } 60 set { _imageUrl= value; } 61 } 62 63 public string ImageAltText 64 { 65 get { return String.IsNullOrEmpty(_imageAltText) ? String.Empty : _imageAltText; } 66 set { _imageAltText = value; } 67 } 68 69} // end class 70 71
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:中小企业网站系统前台源码(SmallBusinessStarterKit)
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146