Asp.net源码专业站
首页->尚未分类->人才网初学者工具包源码>>App-Code/BOL/Country.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:人才网初学者工具包源码
当前文件:文件类型 JobSiteStarterKit/App_Code/BOL/Country.cs[2K,2009-6-12 11:45:42]打开代码结构图
普通视图
		            
1Using directives 11//该源码下载自www.51aspx.com(51aspx.com) 12 13namespace JobSiteStarterKit.BOL 14{ 15 public class Country 16 { 17 public Country() 18 { 19 } 20 21 private string strCountryName; 22 private int intCountryID; 23 24 public string CountryName 25 { 26 get 27 { 28 return strCountryName; 29 } 30 set 31 { 32 strCountryName = value; 33 } 34 } 35 36 public int CountryID 37 { 38 get 39 { 40 return intCountryID; 41 } 42 set 43 { 44 intCountryID = value; 45 } 46 } 47 48 49 public int InsertCountry(Country c) 50 { 51 DBAccess db = new DBAccess(); 52 SqlParameter p = new SqlParameter("@iCountryID", 0); 53 p.Direction = ParameterDirection.Output; 54 db.AddParameter("@sCountryName", c.CountryName); 55 db.AddParameter(p); 56 return db.ExecuteNonQuery("JobsDb_Countries_Insert"); 57 58 } 59 60 public int UpdateCountry(Country c) 61 { 62 DBAccess db = new DBAccess(); 63 db.AddParameter("@iCountryID", c.CountryID); 64 db.AddParameter("@sCountryName", c.CountryName); 65 return db.ExecuteNonQuery("JobsDb_Countries_Update"); 66 } 67 68 public DataSet SelectCountries() 69 { 70 DBAccess db = new DBAccess(); 71 return db.ExecuteDataSet("JobsDb_Countries_SelectAll"); 72 } 73 74 75 76 public static DataSet GetCountries() 77 { 78 DBAccess db = new DBAccess(); 79 return db.ExecuteDataSet("JobsDb_Countries_SelectAll"); 80 } 81 82 83 public static string GetCountryName(int id) 84 { 85 DBAccess db = new DBAccess(); 86 db.AddParameter("@iCountryID", id); 87 return db.ExecuteScalar("JobsDb_Countries_GetCountryName").ToString(); 88 } 89 90 } 91} 92
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:人才网初学者工具包源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146