Beispiel #1
0
        public bool IsAlertIfNumberOfEmpExceedPlan(Guid? OrgStructureID)
        {
            var profileServices = new Hre_ProfileServices();
            Boolean ischeck = profileServices.IsAlertIfNumberOfEmpExceedPlan();
            bool result = false;
            if (ischeck == false || OrgStructureID == null)
            {
                return false;
            }
            string status = string.Empty;
            var baseService = new BaseService();
            var CountProfileByOrgStructureID = baseService.GetData<Hre_ProfileEntity>(Common.DotNetToOracle(OrgStructureID.ToString()), ConstantSql.hrm_hr_sp_get_ProfilebyOrgStructureID, UserLogin, ref status).Count;
            var CountProfileByPlanHeadCount = baseService.GetData<Hre_ProfileEntity>(Common.DotNetToOracle(OrgStructureID.ToString()), ConstantSql.hrm_hr_sp_get_PlanHeadCountbyOrgStructureID, UserLogin, ref status).Count;

            if (CountProfileByOrgStructureID >= CountProfileByPlanHeadCount && CountProfileByPlanHeadCount > 0)
            {
                result = true;
            }
            else
            {
                result = false;
            }
            return result;
        }