public IList <ImperativeUndermanagementInfoProxy> GetAdvancedSearchPersonByImperativeRequest(PersonAdvanceSearchProxy proxy, ImperativeRequestLoadState IRLS, ImperativeRequest imperativeRequest, PersonCategory searchInCategory, int pageIndex, int pageSize) { try { UIValidationExceptions exception = new UIValidationExceptions(); if (imperativeRequest.Precard == null || imperativeRequest.Precard.ID == 0) { exception.Add(new ValidationException(ExceptionResourceKeys.RequestPrecardIsEmpty, "پیشکارت نباید خالی باشد", ExceptionSrc)); } if (imperativeRequest.Year == null || imperativeRequest.Year == 0) { exception.Add(new ValidationException(ExceptionResourceKeys.RequestYearIsEmpty, "سال نباید خالی باشد", ExceptionSrc)); } if (imperativeRequest.Month == null || imperativeRequest.Month == 0) { exception.Add(new ValidationException(ExceptionResourceKeys.RequestMonthIsEmpty, "ماه نباید خالی باشد", ExceptionSrc)); } if (exception.Count == 0) { BApplicationSettings.CheckGTSLicense(); #region Date Convert if (!Utility.IsEmpty(proxy.FromBirthDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.FromBirthDate = Utility.ToMildiDateString(proxy.FromBirthDate); } if (!Utility.IsEmpty(proxy.ToBirthDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.ToBirthDate = Utility.ToMildiDateString(proxy.ToBirthDate); } if (!Utility.IsEmpty(proxy.FromEmploymentDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.FromEmploymentDate = Utility.ToMildiDateString(proxy.FromEmploymentDate); } if (!Utility.IsEmpty(proxy.ToEmploymentDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.ToEmploymentDate = Utility.ToMildiDateString(proxy.ToEmploymentDate); } if (!Utility.IsEmpty(proxy.WorkGroupFromDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.WorkGroupFromDate = Utility.ToMildiDateString(proxy.WorkGroupFromDate); } if (!Utility.IsEmpty(proxy.RuleGroupFromDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.RuleGroupFromDate = Utility.ToMildiDateString(proxy.RuleGroupFromDate); } if (!Utility.IsEmpty(proxy.RuleGroupToDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.RuleGroupToDate = Utility.ToMildiDateString(proxy.RuleGroupToDate); } if (!Utility.IsEmpty(proxy.CalculationFromDate) && BLanguage.CurrentSystemLanguage == LanguagesName.Parsi) { proxy.CalculationFromDate = Utility.ToMildiDateString(proxy.CalculationFromDate); } #endregion IList <Person> list; if (!Utility.IsEmpty(proxy.PersonId)) { list = new List <Person>(); Person prs = this.personBusiness.GetByID((decimal)proxy.PersonId); list.Add(prs); } else { decimal managerId = personBusiness.GetCurentManagerId(ref searchInCategory); list = this.imperativeRequestRepository.GetAdvancedSearchPersonByImperativeRequest(proxy, IRLS, imperativeRequest, BUser.CurrentUser.ID, managerId, searchInCategory, pageIndex, pageSize); } return(this.ConvertToImperativeUndermanagementInfoProxy(list, imperativeRequest, pageSize, pageIndex)); } else { throw exception; } } catch (Exception ex) { LogException(ex, "BImperativeRequest", "GetAdvancedSearchPersonByImperativeRequest"); throw ex; } }