| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:HR_CMN_StaffEntity.cs
- * 2.功能描述:员工实体类
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 张国印 2014/09/12 1.00 新建
- *******************************************************************************/
- using System;
- namespace Dongke.IBOSS.PRD.Client.DataModels
- {
- /// <summary>
- /// 员工实体类
- /// </summary>
- public class HR_CMN_StaffEntity
- {
- #region 属性
- /// <summary>
- /// 身份证号码
- /// </summary>
- public string IDCardNo
- {
- get;
- set;
- }
- /// <summary>
- /// 生日复选框
- /// </summary>
- public bool IsCheckBirthday
- {
- get;
- set;
- }
- /// <summary>
- /// 生日开始时间
- /// </summary>
- public DateTime? StartBirthday
- {
- get;
- set;
- }
- /// <summary>
- /// 生日结束时间
- /// </summary>
- public DateTime? EndBirthday
- {
- get;
- set;
- }
- /// <summary>
- /// 性别编号
- /// </summary>
- public string Gender
- {
- get;
- set;
- }
- /// <summary>
- /// 性别名称
- /// </summary>
- public string GenderName
- {
- get;
- set;
- }
- /// <summary>
- /// 婚姻状况编号
- /// </summary>
- public int? MaritalStatus
- {
- get;
- set;
- }
- /// <summary>
- /// 婚姻状况名称
- /// </summary>
- public string MaritalStatusName
- {
- get;
- set;
- }
- /// <summary>
- /// 籍贯
- /// </summary>
- public string HomeTown
- {
- get;
- set;
- }
- /// <summary>
- /// 政治面貌
- /// </summary>
- public string PolicitalStatus
- {
- get;
- set;
- }
- /// <summary>
- /// 民族编号
- /// </summary>
- public int? National
- {
- get;
- set;
- }
- /// <summary>
- /// 民族名称
- /// </summary>
- public string NationalName
- {
- get;
- set;
- }
- /// <summary>
- /// 学历编号
- /// </summary>
- public int? Educational
- {
- get;
- set;
- }
- /// <summary>
- /// 学历名称
- /// </summary>
- public string EducationalName
- {
- get;
- set;
- }
- /// <summary>
- /// 毕业学校
- /// </summary>
- public string Graduated
- {
- get;
- set;
- }
- /// <summary>
- /// 专业
- /// </summary>
- public string SpecialField
- {
- get;
- set;
- }
- /// <summary>
- /// 联系电话
- /// </summary>
- public string Telephone
- {
- get;
- set;
- }
- #endregion
- #region 事件
- /// <summary>
- /// 将当前实体形成对应的SQL显示语句
- /// </summary>
- /// <returns></returns>
- public string GetSqlDispText()
- {
- //string strDispName = "AND ";
- //#region 获取页面数据形成对应的条件
- //if (!string.IsNullOrEmpty(this.IDCardNo))
- //{
- // strDispName += " 身份证号码 Like '" + this.IDCardNo + "%' AND ";
- //}
- //if (this.IsCheckBirthday)
- //{
- // string strBegin = this.StartBirthday.Value.ToString("yyyy-MM-dd") + " 0:0:0";
- // string strEnd = this.EndBirthday.Value.ToString("yyyy-MM-dd") + " 0:0:0";
- // strDispName += " 生日 >= '" + strBegin + "' AND ";
- // strDispName += " 生日 < '" + strEnd + "' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.GenderName))
- //{
- // strDispName += " 性别 = '" + this.GenderName + "' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.MaritalStatusName))
- //{
- // strDispName += " 婚姻状况 = '" + this.MaritalStatusName + "' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.HomeTown))
- //{
- // strDispName += " 籍贯 Like '" + this.HomeTown + "%' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.PolicitalStatus))
- //{
- // strDispName += " 政治面貌 Like '" + this.PolicitalStatus + "%' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.NationalName))
- //{
- // strDispName += " 民族 = '" + this.NationalName + "' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.EducationalName))
- //{
- // strDispName += " 学历 = '" + this.EducationalName + "' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.Graduated))
- //{
- // strDispName += " 毕业学校 Like '" + this.Graduated + "%' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.SpecialField))
- //{
- // strDispName += " 专业 Like '" + this.SpecialField + "%' AND ";
- //}
- //if (!string.IsNullOrEmpty(this.Telephone))
- //{
- // strDispName += " 联系电话 Like '" + this.Telephone + "%' AND ";
- //}
- //#endregion
- string strDispName = "";
- #region 获取页面数据形成对应的条件
- if (!string.IsNullOrEmpty(this.IDCardNo))
- {
- strDispName += " 身份证号码 :" + this.IDCardNo;
- }
- if (this.IsCheckBirthday)
- {
- string strBegin = this.StartBirthday.Value.ToString("yyyy-MM-dd");
- string strEnd = this.EndBirthday.Value.ToString("yyyy-MM-dd");
- strDispName += " 起始生日 :" + strBegin;
- strDispName += " 结束生日 :" + strEnd;
- }
- if (!string.IsNullOrEmpty(this.GenderName))
- {
- strDispName += " 性别 :" + this.GenderName;
- }
- if (!string.IsNullOrEmpty(this.MaritalStatusName))
- {
- strDispName += " 婚姻状况 :" + this.MaritalStatusName;
- }
- if (!string.IsNullOrEmpty(this.HomeTown))
- {
- strDispName += " 籍贯 :" + this.HomeTown;
- }
- if (!string.IsNullOrEmpty(this.PolicitalStatus))
- {
- strDispName += " 政治面貌 :" + this.PolicitalStatus;
- }
- if (!string.IsNullOrEmpty(this.NationalName))
- {
- strDispName += " 民族 :" + this.NationalName;
- }
- if (!string.IsNullOrEmpty(this.EducationalName))
- {
- strDispName += " 学历 :" + this.EducationalName;
- }
- if (!string.IsNullOrEmpty(this.Graduated))
- {
- strDispName += " 毕业学校 :" + this.Graduated;
- }
- if (!string.IsNullOrEmpty(this.SpecialField))
- {
- strDispName += " 专业 :" + this.SpecialField;
- }
- if (!string.IsNullOrEmpty(this.Telephone))
- {
- strDispName += " 联系电话 :" + this.Telephone;
- }
- #endregion
- #region 形成最后需要的字符串
- strDispName = strDispName.Trim();
- //if (strDispName.Length >= 3)
- //{
- // strDispName = strDispName.Substring(3);
- //}
- //if (strDispName.Length >= 3)
- //{
- // strDispName = strDispName.Substring(0, strDispName.Length - 3);
- //}
- #endregion
- return strDispName;
- }
- /// <summary>
- /// 将实体中对应的值赋值为默认值
- /// </summary>
- public void ClearEntityValue()
- {
- this.IDCardNo = string.Empty;
- this.IsCheckBirthday = false;
- this.StartBirthday = null;
- this.EndBirthday = null;
- this.Gender = string.Empty;
- this.GenderName = string.Empty;
- this.MaritalStatus = null;
- this.MaritalStatusName = string.Empty;
- this.HomeTown = string.Empty;
- this.PolicitalStatus = string.Empty;
- this.National = null;
- this.NationalName = string.Empty;
- this.Educational = null;
- this.EducationalName = string.Empty;
- this.Graduated = string.Empty;
- this.SpecialField = string.Empty;
- this.Telephone = string.Empty;
- }
- #endregion
- }
- }
|