HR_CMN_StaffEntity.cs 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:HR_CMN_StaffEntity.cs
  5. * 2.功能描述:员工实体类
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 张国印 2014/09/12 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. namespace Dongke.IBOSS.PRD.Client.DataModels
  12. {
  13. /// <summary>
  14. /// 员工实体类
  15. /// </summary>
  16. public class HR_CMN_StaffEntity
  17. {
  18. #region 属性
  19. /// <summary>
  20. /// 身份证号码
  21. /// </summary>
  22. public string IDCardNo
  23. {
  24. get;
  25. set;
  26. }
  27. /// <summary>
  28. /// 生日复选框
  29. /// </summary>
  30. public bool IsCheckBirthday
  31. {
  32. get;
  33. set;
  34. }
  35. /// <summary>
  36. /// 生日开始时间
  37. /// </summary>
  38. public DateTime? StartBirthday
  39. {
  40. get;
  41. set;
  42. }
  43. /// <summary>
  44. /// 生日结束时间
  45. /// </summary>
  46. public DateTime? EndBirthday
  47. {
  48. get;
  49. set;
  50. }
  51. /// <summary>
  52. /// 性别编号
  53. /// </summary>
  54. public string Gender
  55. {
  56. get;
  57. set;
  58. }
  59. /// <summary>
  60. /// 性别名称
  61. /// </summary>
  62. public string GenderName
  63. {
  64. get;
  65. set;
  66. }
  67. /// <summary>
  68. /// 婚姻状况编号
  69. /// </summary>
  70. public int? MaritalStatus
  71. {
  72. get;
  73. set;
  74. }
  75. /// <summary>
  76. /// 婚姻状况名称
  77. /// </summary>
  78. public string MaritalStatusName
  79. {
  80. get;
  81. set;
  82. }
  83. /// <summary>
  84. /// 籍贯
  85. /// </summary>
  86. public string HomeTown
  87. {
  88. get;
  89. set;
  90. }
  91. /// <summary>
  92. /// 政治面貌
  93. /// </summary>
  94. public string PolicitalStatus
  95. {
  96. get;
  97. set;
  98. }
  99. /// <summary>
  100. /// 民族编号
  101. /// </summary>
  102. public int? National
  103. {
  104. get;
  105. set;
  106. }
  107. /// <summary>
  108. /// 民族名称
  109. /// </summary>
  110. public string NationalName
  111. {
  112. get;
  113. set;
  114. }
  115. /// <summary>
  116. /// 学历编号
  117. /// </summary>
  118. public int? Educational
  119. {
  120. get;
  121. set;
  122. }
  123. /// <summary>
  124. /// 学历名称
  125. /// </summary>
  126. public string EducationalName
  127. {
  128. get;
  129. set;
  130. }
  131. /// <summary>
  132. /// 毕业学校
  133. /// </summary>
  134. public string Graduated
  135. {
  136. get;
  137. set;
  138. }
  139. /// <summary>
  140. /// 专业
  141. /// </summary>
  142. public string SpecialField
  143. {
  144. get;
  145. set;
  146. }
  147. /// <summary>
  148. /// 联系电话
  149. /// </summary>
  150. public string Telephone
  151. {
  152. get;
  153. set;
  154. }
  155. #endregion
  156. #region 事件
  157. /// <summary>
  158. /// 将当前实体形成对应的SQL显示语句
  159. /// </summary>
  160. /// <returns></returns>
  161. public string GetSqlDispText()
  162. {
  163. //string strDispName = "AND ";
  164. //#region 获取页面数据形成对应的条件
  165. //if (!string.IsNullOrEmpty(this.IDCardNo))
  166. //{
  167. // strDispName += " 身份证号码 Like '" + this.IDCardNo + "%' AND ";
  168. //}
  169. //if (this.IsCheckBirthday)
  170. //{
  171. // string strBegin = this.StartBirthday.Value.ToString("yyyy-MM-dd") + " 0:0:0";
  172. // string strEnd = this.EndBirthday.Value.ToString("yyyy-MM-dd") + " 0:0:0";
  173. // strDispName += " 生日 >= '" + strBegin + "' AND ";
  174. // strDispName += " 生日 < '" + strEnd + "' AND ";
  175. //}
  176. //if (!string.IsNullOrEmpty(this.GenderName))
  177. //{
  178. // strDispName += " 性别 = '" + this.GenderName + "' AND ";
  179. //}
  180. //if (!string.IsNullOrEmpty(this.MaritalStatusName))
  181. //{
  182. // strDispName += " 婚姻状况 = '" + this.MaritalStatusName + "' AND ";
  183. //}
  184. //if (!string.IsNullOrEmpty(this.HomeTown))
  185. //{
  186. // strDispName += " 籍贯 Like '" + this.HomeTown + "%' AND ";
  187. //}
  188. //if (!string.IsNullOrEmpty(this.PolicitalStatus))
  189. //{
  190. // strDispName += " 政治面貌 Like '" + this.PolicitalStatus + "%' AND ";
  191. //}
  192. //if (!string.IsNullOrEmpty(this.NationalName))
  193. //{
  194. // strDispName += " 民族 = '" + this.NationalName + "' AND ";
  195. //}
  196. //if (!string.IsNullOrEmpty(this.EducationalName))
  197. //{
  198. // strDispName += " 学历 = '" + this.EducationalName + "' AND ";
  199. //}
  200. //if (!string.IsNullOrEmpty(this.Graduated))
  201. //{
  202. // strDispName += " 毕业学校 Like '" + this.Graduated + "%' AND ";
  203. //}
  204. //if (!string.IsNullOrEmpty(this.SpecialField))
  205. //{
  206. // strDispName += " 专业 Like '" + this.SpecialField + "%' AND ";
  207. //}
  208. //if (!string.IsNullOrEmpty(this.Telephone))
  209. //{
  210. // strDispName += " 联系电话 Like '" + this.Telephone + "%' AND ";
  211. //}
  212. //#endregion
  213. string strDispName = "";
  214. #region 获取页面数据形成对应的条件
  215. if (!string.IsNullOrEmpty(this.IDCardNo))
  216. {
  217. strDispName += " 身份证号码 :" + this.IDCardNo;
  218. }
  219. if (this.IsCheckBirthday)
  220. {
  221. string strBegin = this.StartBirthday.Value.ToString("yyyy-MM-dd");
  222. string strEnd = this.EndBirthday.Value.ToString("yyyy-MM-dd");
  223. strDispName += " 起始生日 :" + strBegin;
  224. strDispName += " 结束生日 :" + strEnd;
  225. }
  226. if (!string.IsNullOrEmpty(this.GenderName))
  227. {
  228. strDispName += " 性别 :" + this.GenderName;
  229. }
  230. if (!string.IsNullOrEmpty(this.MaritalStatusName))
  231. {
  232. strDispName += " 婚姻状况 :" + this.MaritalStatusName;
  233. }
  234. if (!string.IsNullOrEmpty(this.HomeTown))
  235. {
  236. strDispName += " 籍贯 :" + this.HomeTown;
  237. }
  238. if (!string.IsNullOrEmpty(this.PolicitalStatus))
  239. {
  240. strDispName += " 政治面貌 :" + this.PolicitalStatus;
  241. }
  242. if (!string.IsNullOrEmpty(this.NationalName))
  243. {
  244. strDispName += " 民族 :" + this.NationalName;
  245. }
  246. if (!string.IsNullOrEmpty(this.EducationalName))
  247. {
  248. strDispName += " 学历 :" + this.EducationalName;
  249. }
  250. if (!string.IsNullOrEmpty(this.Graduated))
  251. {
  252. strDispName += " 毕业学校 :" + this.Graduated;
  253. }
  254. if (!string.IsNullOrEmpty(this.SpecialField))
  255. {
  256. strDispName += " 专业 :" + this.SpecialField;
  257. }
  258. if (!string.IsNullOrEmpty(this.Telephone))
  259. {
  260. strDispName += " 联系电话 :" + this.Telephone;
  261. }
  262. #endregion
  263. #region 形成最后需要的字符串
  264. strDispName = strDispName.Trim();
  265. //if (strDispName.Length >= 3)
  266. //{
  267. // strDispName = strDispName.Substring(3);
  268. //}
  269. //if (strDispName.Length >= 3)
  270. //{
  271. // strDispName = strDispName.Substring(0, strDispName.Length - 3);
  272. //}
  273. #endregion
  274. return strDispName;
  275. }
  276. /// <summary>
  277. /// 将实体中对应的值赋值为默认值
  278. /// </summary>
  279. public void ClearEntityValue()
  280. {
  281. this.IDCardNo = string.Empty;
  282. this.IsCheckBirthday = false;
  283. this.StartBirthday = null;
  284. this.EndBirthday = null;
  285. this.Gender = string.Empty;
  286. this.GenderName = string.Empty;
  287. this.MaritalStatus = null;
  288. this.MaritalStatusName = string.Empty;
  289. this.HomeTown = string.Empty;
  290. this.PolicitalStatus = string.Empty;
  291. this.National = null;
  292. this.NationalName = string.Empty;
  293. this.Educational = null;
  294. this.EducationalName = string.Empty;
  295. this.Graduated = string.Empty;
  296. this.SpecialField = string.Empty;
  297. this.Telephone = string.Empty;
  298. }
  299. #endregion
  300. }
  301. }