public List <FixOrgEmp> SearchFixOrganization(FixOrganizationCriteria criteria) { using (TransactionEntities Context = new TransactionEntities()) { var result = Context.SearchFixOrgByEmp( prodDateFrom: criteria.ProdDateFrom , prodDateTo: criteria.ProdDateTo , searchEmpCode: criteria.SearchEmpCode , searchEmpName: criteria.SearchEmpName , empCode: criteria.EmpCode , effectiveDateFrom: criteria.EffectiveDateFrom ).ToList(); return(result); } }
public ActionResult SearchFixOrganization(DataSourceLoadOptions loadOptions, FixOrganizationCriteria criteria) { try { List <FixOrganizationViewModel> result = new List <FixOrganizationViewModel>(); if (!criteria.isFirstLoad) { result = MasterService.SearchFixOrganization(criteria).ToModels(); } return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(result, loadOptions)), ConstantValues.JSON_CONTENT_TYPE)); } catch (Exception ex) { throw ex; } }