您目前尚未登陆,请选择【登陆】或【注册
首页->其他源码->人才网初学者工具包源码>>App-Code/BOL/MyJob.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:人才网初学者工具包源码


当前文件路径:JobSiteStarterKit/App_Code/BOL/MyJob.cs 文件类型
普通视图
		            
1Using directives 10 11namespace JobSiteStarterKit.BOL 12{ 13 public class MyJob 14 { 15 16 private int intMyJobID; 17 private int intPostingID; 18 private string strUserName; 19 20 public int MyJobID 21 { 22 get 23 { 24 return intMyJobID; 25 } 26 set 27 { 28 intMyJobID = value; 29 } 30 } 31 32 public int PostingID 33 { 34 get 35 { 36 return intPostingID; 37 } 38 set 39 { 40 intPostingID = value; 41 } 42 } 43 44 public string UserName 45 { 46 get 47 { 48 return strUserName; 49 } 50 set 51 { 52 strUserName = value; 53 } 54 } 55 56 /// <summary> 57 /// 插入一个新的我的职位收藏到数据库中 58 /// </summary> 59 /// <param name="j"></param> 60 /// <returns></returns> 61 public static int Insert(MyJob j) 62 { 63 DBAccess db = new DBAccess(); 64 db.AddParameter("@iPostingID", j.PostingID); 65 db.AddParameter("@sUserName", j.UserName); 66 SqlParameter p = new SqlParameter("@iMyJobID", SqlDbType.Int); 67 p.Direction = ParameterDirection.Output; 68 db.AddParameter(p); 69 70 int retval = db.ExecuteNonQuery("JobsDb_MyJobs_Insert"); 71 if (retval == 1) 72 { 73 return int.Parse(p.Value.ToString()); 74 } 75 else 76 { 77 return -1; 78 } 79 } 80 81 82 public static int Delete(MyJob j) 83 { 84 DBAccess db = new DBAccess(); 85 db.AddParameter("@iMyJobID",j.MyJobID); 86 return db.ExecuteNonQuery("JobsDb_MyJobs_Delete"); 87 } 88 89 public static DataSet GetMyJobs(string username) 90 { 91 DBAccess db = new DBAccess(); 92 db.AddParameter("@sUserName", username); 93 return db.ExecuteDataSet("JobsDb_MyJobs_SelectForUser"); 94 } 95 } 96} 97
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:人才网初学者工具包源码

- 综合示例源码(文章、论坛、会..

- Asp.net最简聊天室源码(51a..

- 文件管理系统源码(Asp.net1.1)

- 魔法映像企业网站管理系统

- Vs2005下GridView演示多层De..

- Asp.net投票系统[单/复选,投..

- 三层个人网站小程序(Ajax)

- 永远在一起论坛2.0版源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号