本文整理汇总了C#中HRM.Business.Hr.Domain.Hre_ProfileServices.IsNotUseExpiryContractLoop方法的典型用法代码示例。如果您正苦于以下问题:C# Hre_ProfileServices.IsNotUseExpiryContractLoop方法的具体用法?C# Hre_ProfileServices.IsNotUseExpiryContractLoop怎么用?C# Hre_ProfileServices.IsNotUseExpiryContractLoop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRM.Business.Hr.Domain.Hre_ProfileServices
的用法示例。
在下文中一共展示了Hre_ProfileServices.IsNotUseExpiryContractLoop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetExpiryContract
public ActionResult GetExpiryContract([DataSourceRequest] DataSourceRequest request, Hre_ReportExpiryContractModel Model)
{
string status = string.Empty;
var service = new Hre_ReportServices();
var actionServices = new ActionService(UserLogin);
var profileServices = new Hre_ProfileServices();
var contractServices = new Hre_ContractServices();
BaseService baseServices = new BaseService();
bool isshowloopcontract = profileServices.IsNotUseExpiryContractLoop();
var ShowAfterDate1 = actionServices.GetData<Sys_AllSettingEntity>("HRM_HRE_CONTRACT_ALERT_EXPRIDAY_VALUEAFTE", ConstantSql.hrm_sys_sp_get_AllSettingByKey, ref status).FirstOrDefault();
var ShowBeforDate1 = actionServices.GetData<Sys_AllSettingEntity>("HRM_HRE_CONTRACT_ALERT_EXPRIDAY_VALUEBEFOR", ConstantSql.hrm_sys_sp_get_AllSettingByKey, ref status).FirstOrDefault();
DateTime? dateTo = null;
DateTime? dateFrom = null;
if (isshowloopcontract == false)
{
dateTo = DateTime.Now.AddDays(Convert.ToDouble(ShowAfterDate1.Value1));
dateFrom = DateTime.Now.AddDays(-Convert.ToDouble(ShowBeforDate1.Value1));
}
var isDataTable = false;
object obj = new Hre_ReportExpiryContractModel();
//var lstProfile = new List<Hre_ProfileEntity>();
var objProfile = new List<object>();
objProfile.AddRange(new object[2]);
objProfile[0] = 1;
objProfile[1] = int.MaxValue - 1;
var lstProfile = actionServices.GetData<Hre_ProfileEntity>(objProfile, ConstantSql.hrm_hr_sp_get_ProfileDataAll, ref status).ToList();
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);
var lstContractType = actionServices.GetData<CatContractTypeModel>(lstObjContractType, ConstantSql.hrm_cat_sp_get_ContractType, ref status).ToList();
List<object> listObj = new List<object>();
listObj.Add(Model.OrgStructureID);
listObj.Add(Model.Status);
listObj.Add(dateFrom);
listObj.Add(dateTo);
listObj.Add(Model.CodeEmp);
listObj.Add(Model.ProfileName);
listObj.Add(Model.IDNo);
listObj.Add(Model.WorkPlaceID);
listObj.Add(Model.DateSignedFrom);
listObj.Add(Model.DateSignedTo);
listObj.Add(Model.ContractNo);
listObj.Add(1);
listObj.Add(int.MaxValue - 1);
var result = actionServices.GetData<Hre_ReportExpiryContractEntity>(listObj, ConstantSql.hrm_hr_sp_get_RptExpireContract, ref status).Where(s => s.StatusEvaluation != WorkdayStatus.E_APPROVED.ToString()).ToList().Translate<Hre_ReportExpiryContractModel>();
var objContract = new List<object>();
objContract.AddRange(new object[21]);
objContract[19] = 1;
objContract[20] = int.MaxValue - 1;
var lstContracts = actionServices.GetData<Hre_ContractEntity>(objContract, ConstantSql.hrm_hr_sp_get_Contract, ref status).ToList();
Guid[] _RankDetailForNextContract = null;
if (!string.IsNullOrEmpty(Model.RankDetailForNextContractIds))
{
_RankDetailForNextContract = Model.RankDetailForNextContractIds.Split(',').Select(s => Guid.Parse(s)).ToArray();
}
if (Model.ContractTypeID != null)
{
result = result.Where(s => s.ContractTypeID == Model.ContractTypeID).ToList();
}
if (!string.IsNullOrEmpty(Model.Status))
{
result = result.Where(s => s.Status == Model.Status).ToList();
}
var lstModel = new List<Hre_ReportExpiryContractModel>();
if (_RankDetailForNextContract != null)
{
result = result.Where(s => _RankDetailForNextContract.Contains(s.RankDetailForNextContract != null ? s.RankDetailForNextContract.Value : Guid.Empty)).ToList();
}
if (Model.EvaType == EnumDropDown.EvaExpiryContract.E_EVA_CONTRACT.ToString())
{
result = result.Where(s => s.StatusEvaluation != WorkdayStatus.E_APPROVED.ToString() && s.ContractResult != null).ToList();
if (isshowloopcontract == false)
{
var model = new Hre_ReportExpiryContractModel();
foreach (var item in result)
{
var ContractByProfileID = lstContracts.Where(s => s.ProfileID == item.ProfileID).OrderByDescending(s => s.DateCreate).FirstOrDefault();
if (ContractByProfileID != null)
{
if (ContractByProfileID.DateCreate != null && ContractByProfileID.DateCreate.Value.ToShortDateString() != DateTime.Now.ToShortDateString())
{
if (item.DateExtend != null && item.DateExtend >= dateFrom && item.DateExtend <= dateTo)
{
model = item;
//.........这里部分代码省略.........