本文整理汇总了C#中HRM.Business.Hr.Domain.Hre_ProfileServices.IsShowExConByConResult方法的典型用法代码示例。如果您正苦于以下问题:C# Hre_ProfileServices.IsShowExConByConResult方法的具体用法?C# Hre_ProfileServices.IsShowExConByConResult怎么用?C# Hre_ProfileServices.IsShowExConByConResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRM.Business.Hr.Domain.Hre_ProfileServices
的用法示例。
在下文中一共展示了Hre_ProfileServices.IsShowExConByConResult方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
public DashboardAlertsModel Get()
{
var profileServices = new Hre_ProfileServices();
Sys_AttOvertimePermitConfigServices sysServices = new Sys_AttOvertimePermitConfigServices();
DashboardAlertsModel dashboardAlertModel = new DashboardAlertsModel();
ActionService service = new ActionService(UserLogin);
BaseService baseServices = new BaseService();
string status = string.Empty;
Boolean ischeck = profileServices.IsShowExConByConResult();
#region lay cau hinh hien thi hop dong sap den han
//lay cau hinh hien thi hop dong sap den han
dashboardAlertModel.ShowValue1 = sysServices.GetConfigValue<bool>(AppConfig.HRM_HRE_CONTRACT_ALERT_EXPRIDAY);
if (dashboardAlertModel.ShowValue1 != null && dashboardAlertModel.ShowValue1 == true)
{
var ShowAfterDate1 = service.GetData<Sys_AllSettingEntity>("HRM_HRE_CONTRACT_ALERT_EXPRIDAY_VALUEAFTE", ConstantSql.hrm_sys_sp_get_AllSettingByKey, ref status).FirstOrDefault();
var ShowBeforDate1 = service.GetData<Sys_AllSettingEntity>("HRM_HRE_CONTRACT_ALERT_EXPRIDAY_VALUEBEFOR", ConstantSql.hrm_sys_sp_get_AllSettingByKey, ref status).FirstOrDefault();
DateTime? dateFrom = null;
DateTime? dateTo = null;
var count = 0;
string _status = EnumDropDown.Status.E_APPROVED.ToString();
if (ischeck == false)
{
dateTo = ShowAfterDate1.Value1 != null ? DateTime.Now.AddDays(Convert.ToDouble(ShowAfterDate1.Value1)) : DateTime.Now.AddDays(0);
dateFrom = ShowBeforDate1.Value1 != null ? DateTime.Now.AddDays(-Convert.ToDouble(ShowBeforDate1.Value1)) : DateTime.Now.AddDays(0);
}
#region lstObjExpiryContract
List<object> lstObjExpiryContract = new List<object>();
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(_status);
lstObjExpiryContract.Add(dateFrom);
lstObjExpiryContract.Add(dateTo);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(null);
lstObjExpiryContract.Add(1);
lstObjExpiryContract.Add(int.MaxValue - 1);
#endregion
#region lstObjContractType
var lstObjContractType = new List<object>();
lstObjContractType.Add(null);
lstObjContractType.Add(null);
lstObjContractType.Add(null);
lstObjContractType.Add(null);
lstObjContractType.Add(1);
lstObjContractType.Add(int.MaxValue - 1);
#endregion
var lstContractType = baseServices.GetData<CatContractTypeModel>(lstObjContractType, ConstantSql.hrm_cat_sp_get_ContractType, UserLogin, ref status);
var lstExpiryContract = baseServices.GetData<Hre_ContractModel>(lstObjExpiryContract, ConstantSql.hrm_hr_sp_get_RptExpireContract, UserLogin, ref status).Where(s => s.StatusEvaluation != WorkdayStatus.E_APPROVED.ToString()).ToList();
foreach (var item in lstExpiryContract)
{
var dateCheck = DateTime.Now;
var contractTypeEntity = lstContractType.Where(s => item.ContractTypeID == s.ID).FirstOrDefault();
if (ischeck == true)
{
if (contractTypeEntity != null && contractTypeEntity.ExpiryContractLoop != null)
{
var dateExpiry = dateCheck.AddDays(contractTypeEntity.ExpiryContractLoop.Value);
if (contractTypeEntity != null && contractTypeEntity.ExpiryContractLoop != null)
{
if (item.DateExtend != null && item.DateExtend <= dateExpiry)
{
count++;
}
if (item.DateExtend == null && item.DateEnd != null && item.DateEnd.Value <= dateExpiry)
{
count++;
}
}
}
}
else
{
count++;
}
}
dashboardAlertModel.sumContract = count;
}
#endregion
#region lay cau hinh hien thi sinh nhat trong thang
dashboardAlertModel.ShowValue5 = sysServices.GetConfigValue<bool>(AppConfig.HRM_HRE_PROFILE_ALERT_BIRTHDAY_NOWDAY);
//.........这里部分代码省略.........