/*******************************************************************************
* 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
{
///
/// 员工实体类
///
public class HR_CMN_StaffEntity
{
#region 属性
///
/// 身份证号码
///
public string IDCardNo
{
get;
set;
}
///
/// 生日复选框
///
public bool IsCheckBirthday
{
get;
set;
}
///
/// 生日开始时间
///
public DateTime? StartBirthday
{
get;
set;
}
///
/// 生日结束时间
///
public DateTime? EndBirthday
{
get;
set;
}
///
/// 性别编号
///
public string Gender
{
get;
set;
}
///
/// 性别名称
///
public string GenderName
{
get;
set;
}
///
/// 婚姻状况编号
///
public int? MaritalStatus
{
get;
set;
}
///
/// 婚姻状况名称
///
public string MaritalStatusName
{
get;
set;
}
///
/// 籍贯
///
public string HomeTown
{
get;
set;
}
///
/// 政治面貌
///
public string PolicitalStatus
{
get;
set;
}
///
/// 民族编号
///
public int? National
{
get;
set;
}
///
/// 民族名称
///
public string NationalName
{
get;
set;
}
///
/// 学历编号
///
public int? Educational
{
get;
set;
}
///
/// 学历名称
///
public string EducationalName
{
get;
set;
}
///
/// 毕业学校
///
public string Graduated
{
get;
set;
}
///
/// 专业
///
public string SpecialField
{
get;
set;
}
///
/// 联系电话
///
public string Telephone
{
get;
set;
}
#endregion
#region 事件
///
/// 将当前实体形成对应的SQL显示语句
///
///
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;
}
///
/// 将实体中对应的值赋值为默认值
///
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
}
}