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