forked from youthjoy/hfoa
/
Bll_HR_Experience.cs
108 lines (103 loc) · 3.4 KB
/
Bll_HR_Experience.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QX.DAL;
using QX.Model;
using QX.Comm;
namespace QX.BLL
{
public partial class Bll_HR_Experience
{
public List<HR_Experience> GetExperienceListByCode(string code)
{
string where = string.Format(" AND EXa_StuffCode='{0}'", code);
List<HR_Experience> list = instance.GetListByWhere(where);
return list;
}
/// <summary>
///
/// </summary>
/// <param name="code"></param>
/// <param name="type">经历类型 (工作经历)</param>
/// <returns></returns>
public List<HR_Experience> GetExperienceListByType(string code)
{
string where = string.Format(" AND EXa_StuffCode='{0}' and EXa_type='{1}'", code, "PersonEx");
List<HR_Experience> list = instance.GetListByWhere(where);
return list;
}
/// <summary>
/// 经历类型 (工作经历)
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public List<HR_Experience> GetExperienceListByTypeJL(string code)
{
string where = string.Format(" AND EXa_type='{1}'", code, "PersonEx");
List<HR_Experience> list = instance.GetListByWhere(where);
return list;
}
/// <summary>
///
/// </summary>
/// <param name="code"></param>
/// <param name="type">经历类型 (工作经历)</param>
/// <returns></returns>
public List<HR_Experience> GetExperienceListByTypeJY(string code)
{
string where = string.Format(" AND EXa_StuffCode='{0}' and EXa_type='{1}'", code, "Education");
List<HR_Experience> list = instance.GetListByWhere(where);
return list;
}
/// <summary>
/// 经历类型 (工作经历)
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public List<HR_Experience> GetExperienceListByTypeJYCOUNT(string code)
{
string where = string.Format(" AND EXa_type='{1}'", code, "Education");
List<HR_Experience> list = instance.GetListByWhere(where);
return list;
}
public HR_Experience GetModelByCode(string code)
{
return GetModel(string.Format("AND EXa_Code='{0}'", code));
}
/// <summary>
/// 新增或更新对象
/// </summary>
/// <param name="Mn"></param>
/// <returns></returns>
public bool AddUpdatePlanObject(HR_Experience Mn,string type)
{
if (Mn.EX_ID.Equals(0))
{
Mn.EX_Type = type;
return instance.Add(Mn).Equals(1);
}
else
{
return instance.Update(Mn).Equals(1);
}
}
/// <summary>
/// 新增或更新对象
/// </summary>
/// <param name="Mn"></param>
/// <returns></returns>
public bool AddUpdatePlanObjectJY(HR_Experience Mnjy)
{
if (Mnjy.EX_ID.Equals(0))
{
Mnjy.EX_Type = "Education";
return instance.Add(Mnjy).Equals(1);
}
else
{
return instance.Update(Mnjy).Equals(1);
}
}
}
}