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

1Using directives#region Using directives 2
3
using System; 4
using System.Collections.Generic; 5
using System.Text; 6
using JobSiteStarterKit.DAL; 7
using System.Data; 8
using System.Data.SqlClient; 9
10
#endregion 11
12
namespace JobSiteStarterKit.BOL 13
...{ 14
public class Resume 15
...{ 16
17
Member Variables#region Member Variables 18
19
private int intResumeID; 20
private string strUserName; 21
private string strJobTitle; 22
private string strCity; 23
private int intCountryID; 24
private int intStateID; 25
private int intRelocationCountryID; 26
private int intJobTypeID; 27
private int intEduLevelID; 28
private int intExpLevelID; 29
private string strResumeText; 30
private string strCoveringLetterText; 31
private string strIsSearchable; 32
private DateTime dtPostedDate; 33
34
#endregion 35
36
Public Properties#region Public Properties 37
38
public int ResumeID 39
...{ 40
get 41
...{ 42
return intResumeID; 43
} 44
set 45
...{ 46
intResumeID = value; 47
} 48
} 49
50
public string UserName 51
...{ 52
get 53
...{ 54
return strUserName; 55
} 56
set 57
...{ 58
strUserName = value; 59
} 60
} 61
62
public string JobTitle 63
...{ 64
get 65
...{ 66
return strJobTitle; 67
} 68
set 69
...{ 70
strJobTitle = value; 71
} 72
} 73
74
public string City 75
...{ 76
get 77
...{ 78
return strCity; 79
} 80
set 81
...{ 82
strCity = value; 83
} 84
} 85
86
public int CountryID 87
...{ 88
get 89
...{ 90
return intCountryID; 91
} 92
set 93
...{ 94
intCountryID = value; 95
} 96
} 97
98
public int StateID 99
...{ 100
get 101
...{ 102
return intStateID; 103
} 104
set 105
...{ 106
intStateID = value; 107
} 108
} 109
110
public int RelocationCountryID 111
...{ 112
get 113
...{ 114
return intRelocationCountryID; 115
} 116
set 117
...{ 118
intRelocationCountryID = value; 119
} 120
} 121
122
public int JobTypeID 123
...{ 124
get 125
...{ 126
return intJobTypeID; 127
} 128
set 129
...{ 130
intJobTypeID = value; 131
} 132
133
} 134
135
public int EducationLevelID 136
...{ 137
get 138
...{ 139
return intEduLevelID; 140
} 141
set 142
...{ 143
intEduLevelID = value; 144
} 145
} 146
147
public int ExperienceLevelID 148
...{ 149
get 150
...{ 151
return intExpLevelID; 152
} 153
set 154
...{ 155
intExpLevelID = value; 156
} 157
} 158
159
public string ResumeText 160
...{ 161
get 162
...{ 163
return strResumeText; 164
} 165
set 166
...{ 167
strResumeText = value; 168
} 169
} 170
171
public string CoveringLetterText 172
...{ 173
get 174
...{ 175
return strCoveringLetterText; 176
} 177
set 178
...{ 179
strCoveringLetterText = value; 180
} 181
} 182
183
public string IsSearchable 184
...{ 185
get 186
...{ 187
return strIsSearchable; 188
} 189
set 190
...{ 191
strIsSearchable = value; 192
} 193
} 194
195
public DateTime PostedDate 196
...{ 197
get 198
...{ 199
return dtPostedDate; 200
} 201
set 202
...{ 203
dtPostedDate = value; 204
} 205
} 206
207
#endregion 208
209
Public Static Methods#region Public Static Methods 210
211
public static Resume GetResume(string username) 212
...{ 213
DBAccess db = new DBAccess(); 214
db.AddParameter("@sUserName", username); 215
SqlDataReader dr = (SqlDataReader)db.ExecuteReader("JobsDb_Resumes_SelectForUser"); 216
if (dr.HasRows) 217
...{ 218
Resume r = new Resume(); 219
while (dr.Read()) 220
...{ 221
r.ResumeID = dr.GetInt32(dr.GetOrdinal("ResumeID")); 222
r.City = dr.GetString(dr.GetOrdinal("TargetCity")); 223
r.CountryID = dr.GetInt32(dr.GetOrdinal("TargetCountryID")); 224
r.CoveringLetterText = dr.GetString(dr.GetOrdinal("CoverLetterText")); 225
r.EducationLevelID = dr.GetInt32(dr.GetOrdinal("EducationLevelID")); 226
r.ExperienceLevelID = dr.GetInt32(dr.GetOrdinal("ExperienceLevelID")); 227
r.IsSearchable = dr.GetString(dr.GetOrdinal("IsSearchable")); 228
r.JobTitle = dr.GetString(dr.GetOrdinal("JobTitle")); 229
r.JobTypeID = dr.GetInt32(dr.GetOrdinal("TargetJobTypeID")); 230
r.RelocationCountryID = dr.GetInt32(dr.GetOrdinal("RelocationCountryID")); 231
r.ResumeText = dr.GetString(dr.GetOrdinal("ResumeText")); 232
r.StateID = dr.GetInt32(dr.GetOrdinal("TargetStateID")); 233
r.UserName = dr.GetString(dr.GetOrdinal("UserName")); 234
r.PostedDate = dr.GetDateTime(dr.GetOrdinal("PostDate")); 235
} 236
dr.Close(); 237
return r; 238
} 239
else 240
...{ 241
dr.Close(); 242
Resume r = new Resume(); 243
r.ResumeID = -1; 244
return r; 245
} 246
247
} 248
249
public static Resume GetResume(int resumeid) 250
...{ 251
DBAccess db = new DBAccess(); 252
db.AddParameter("@iResumeID", resumeid); 253
SqlDataReader dr = (SqlDataReader)db.ExecuteReader("JobsDb_Resumes_SelectOne"); 254
if (dr.HasRows) 255
...{ 256
Resume r = new Resume(); 257
while (dr.Read()) 258
...{ 259
r.ResumeID = dr.GetInt32(dr.GetOrdinal("ResumeID")); 260
r.City = dr.GetString(dr.GetOrdinal("TargetCity")); 261
r.CountryID = dr.GetInt32(dr.GetOrdinal("TargetCountryID")); 262
r.CoveringLetterText = dr.GetString(dr.GetOrdinal("CoverLetterText")); 263
r.EducationLevelID = dr.GetInt32(dr.GetOrdinal("EducationLevelID")); 264
r.ExperienceLevelID = dr.GetInt32(dr.GetOrdinal("ExperienceLevelID")); 265
r.IsSearchable = dr.GetString(dr.GetOrdinal("IsSearchable")); 266
r.JobTitle = dr.GetString(dr.GetOrdinal("JobTitle")); 267
r.JobTypeID = dr.GetInt32(dr.GetOrdinal("TargetJobTypeID")); 268
r.RelocationCountryID = dr.GetInt32(dr.GetOrdinal("RelocationCountryID")); 269
r.ResumeText = dr.GetString(dr.GetOrdinal("ResumeText")); 270
r.StateID = dr.GetInt32(dr.GetOrdinal("TargetStateID")); 271
r.UserName = dr.GetString(dr.GetOrdinal("UserName")); 272
r.PostedDate = dr.GetDateTime(dr.GetOrdinal("PostDate")); 273
} 274
dr.Close(); 275
return r; 276
} 277
else 278
...{ 279
dr.Close(); 280
return new Resume(); 281
} 282
283
} 284
285
286
public static int Insert(Resume r) 287
...{ 288
DBAccess db = new DBAccess(); 289
db.AddParameter("@sJobTitle", r.JobTitle); 290
db.AddParameter("@sTargetCity", r.City); 291
db.AddParameter("@iTargateStateID", r.StateID); 292
db.AddParameter("@iTargetCountryID", r.CountryID); 293
db.AddParameter("@iRelocationCountryID", r.RelocationCountryID); 294
db.AddParameter("@iTargetJobTypeID", r.JobTypeID); 295
db.AddParameter("@iEducationLevelID", r.EducationLevelID); 296
![]()




