温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:人才网初学者工具包源码
当前文件路径:JobSiteStarterKit/App_Code/BOL/MyResume.cs

1Using directives 11
12
namespace JobSiteStarterKit.BOL 13
{ 14
public class MyResume 15
{ 16
private int intMyResumeID; 17
private int intResumeID; 18
private string strUserName; 19
20
public int MyResumeID 21
{ 22
get 23
{ 24
return intMyResumeID; 25
} 26
set 27
{ 28
intMyResumeID = value; 29
} 30
} 31
32
public int ResumeID 33
{ 34
get 35
{ 36
return intResumeID; 37
} 38
set 39
{ 40
intResumeID = value; 41
} 42
} 43
44
45
public string UserName 46
{ 47
get 48
{ 49
return strUserName; 50
} 51
set 52
{ 53
strUserName = value; 54
} 55
} 56
57
58
public static int Insert(MyResume r) 59
{ 60
DBAccess db = new DBAccess(); 61
db.AddParameter("@iResumeID", r.ResumeID); 62
db.AddParameter("@sUserName", r.UserName); 63
SqlParameter p = new SqlParameter("@iMyResumeID", SqlDbType.Int); 64
p.Direction = ParameterDirection.Output; 65
db.AddParameter(p); 66
67
int retval = db.ExecuteNonQuery("JobsDb_MyResumes_Insert"); 68
if (retval == 1) 69
{ 70
return int.Parse(p.Value.ToString()); 71
} 72
else 73
{ 74
return -1; 75
} 76
} 77
78
79
public static int Delete(MyResume r) 80
{ 81
DBAccess db = new DBAccess(); 82
db.AddParameter("@iMyResumeID",r.MyResumeID); 83
return db.ExecuteNonQuery("JobsDb_MyResumes_Delete"); 84
} 85
86
public static DataSet GetMyResumes(string username) 87
{ 88
DBAccess db = new DBAccess(); 89
db.AddParameter("@sUserName", username); 90
return db.ExecuteDataSet("JobsDb_MyResumes_SelectForUser"); 91
} 92
93
} 94
} 95





}