本文整理汇总了C#中HRM.Business.Hr.Domain.Hre_ProfileServices.IsCheckDuplidateRelatives方法的典型用法代码示例。如果您正苦于以下问题:C# Hre_ProfileServices.IsCheckDuplidateRelatives方法的具体用法?C# Hre_ProfileServices.IsCheckDuplidateRelatives怎么用?C# Hre_ProfileServices.IsCheckDuplidateRelatives使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRM.Business.Hr.Domain.Hre_ProfileServices
的用法示例。
在下文中一共展示了Hre_ProfileServices.IsCheckDuplidateRelatives方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckDuplicateRelatives
public string CheckDuplicateRelatives(Guid? ID, string name)
{
// Kiểm tra có check trùng dữ liệu hay không
var hre_profileservices = new Hre_ProfileServices();
Boolean ischeck = hre_profileservices.IsCheckDuplidateRelatives();
if (ischeck == false)
{
return null;
}
if (ID == null)
{
ID = Guid.Empty;
}
string result = null;
bool isduplicate = false;
string status = string.Empty;
var actionService = new ActionService(UserLogin);
var objsRelative = new List<object>();
objsRelative.Add(ID);
objsRelative.Add(name);
var lstRelativeName = actionService.GetData<Hre_RelativesEntity>(objsRelative, ConstantSql.hrm_hr_sp_get_Relativebyname, ref status).Select(s => new { s.RelativeName }).ToList();
if (lstRelativeName != null && lstRelativeName.Count > 0)
{
foreach (var item in lstRelativeName)
{
result += item.RelativeName + ", ";
}
result = result.Substring(0, result.Length - 2);
}
var objsProfile = new List<object>();
objsProfile.Add(name);
var lstProfileName = actionService.GetData<Hre_ProfileEntity>(objsProfile, ConstantSql.hrm_hr_sp_get_profilebyname, ref status).Select(s => new { s.CodeEmp, s.ProfileName }).ToList();
if (lstProfileName != null && lstProfileName.Count > 0)
{
foreach (var item in lstProfileName)
{
if (item.CodeEmp == null)
{
result += item.ProfileName + ", ";
}
result += item.ProfileName + " - " + item.CodeEmp + ", ";
}
result = result.Substring(0, result.Length - 2);
}
return result;
}