Example #1
0
        public ActionResult GetFilterCandidateList([DataSourceRequest] DataSourceRequest request, Rec_FilterCandidateModel model)
        {
            var services = new Rec_CandidateServices();
            var dateFrom = DateTime.Now.Date;
            var dateTo = DateTime.Now.Date;
            var lstModel = new List<Rec_CandidateModel>();

            if (model.DateFrom != null)
            {
                dateFrom = model.DateFrom.Value;
            }

            if (model.DateTo != null)
            {
                dateTo = model.DateTo.Value;
            }
            var result = services.FilterCandidate(dateFrom, dateTo, model.JobVacancyIDs, UserLogin, model.GetListFail, model.IsIncludeEvaCandidate).ToList();
            if (result.Count > 0)
            {
                lstModel = result.Translate<Rec_CandidateModel>();
            }
            return Json(lstModel.ToDataSourceResult(request));
            //return GetListDataAndReturn<Rec_CandidateModel, Rec_CandidateEntity, Rec_CandidateGeneralMultiSearchModel>(request, candidateModel, ConstantSql.hrm_hr_sp_get_Candidate_GeneralGrid);
        }