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