public List <GetDocTemplateListDto> GetDocTemplate() { var getDocTemplate = (from A in _msDocTemplateRepo.GetAll() join B in _msDocumentRepo.GetAll() on A.docID equals B.Id select new GetDocTemplateListDto { docTemplateID = A.Id, docTemplateCode = _iFilesHelper.ConvertIdToCode(A.Id), docTemplateName = A.templateName, linkFileDoc = (A != null && A.templateFile != null) ? getAbsoluteUriWithoutTail() + GetURLWithoutHost(A.templateFile) : null, docCode = B.docCode }).ToList(); return(getDocTemplate); }
public PagedResultDto <GetPSASListOfKuasaDireksiListDto> GetPSASListOfKuasaDireksi(PSASListOfKuasaDireksiInputDto input) { var queryMsKuasaDireksi = (from A in _msKuasaDireksiRepo.GetAll() join B in _msDocumentRepo.GetAll() on A.docID equals B.Id join C in _msProjectRepo.GetAll() on A.projectID equals C.Id select new GetPSASListOfKuasaDireksiListDto { entityID = A.entityID, kuasaDireksiID = A.Id, kuasaDireksiCode = _iFilesHelper.ConvertIdToCode(A.Id), docID = A.docID, docCode = B.docCode, projectID = A.projectID, projectCode = C.projectCode, projectName = C.projectName, suratKuasaImage = (A != null && A.suratKuasaImage != null) ? getAbsoluteUriWithoutTail() + GetURLWithoutHost(A.suratKuasaImage) : null, //TODO link + ip host, remarks = A.remarks, isActive = A.isActive }) .WhereIf(!input.Filter.IsNullOrWhiteSpace(), u => u.projectName.ToLower().Contains(input.Filter.ToLower()) || u.docCode.ToLower().Contains(input.Filter.ToLower()) || u.kuasaDireksiCode.ToLower().Contains(input.Filter.ToLower()) || u.remarks.ToLower().Contains(input.Filter.ToLower()) ); var dataCount = queryMsKuasaDireksi.Count(); var getListOfKuasaDireksi = queryMsKuasaDireksi .OrderBy(input.Sorting) .PageBy(input) .ToList(); return(new PagedResultDto <GetPSASListOfKuasaDireksiListDto>( dataCount, getListOfKuasaDireksi )); }
public PagedResultDto <GetMappingTemplateListDto> GetMappingTemplate(GetMappingTemplateInputDto input) { var queryMappingTemplate = (from A in _msMappingTemplateRepo.GetAll() join B in _msDocTemplateRepo.GetAll() on A.docTemplateID equals B.Id join C in _msProjectRepo.GetAll() on A.projectID equals C.Id join D in _msDocumentPsRepo.GetAll() on A.docID equals D.Id select new GetMappingTemplateListDto { entityID = A.Id, mappingTemplateID = A.Id, mappingTemplateCode = _iFilesHelper.ConvertIdToCode(A.Id), docID = A.docID, docCode = D.docCode, docTemplateID = B.Id, docTemplateName = B.templateName, projectID = A.projectID, projectName = C.projectName, isActive = A.isActive, isTandaTerima = A.isTandaTerima, activeFrom = A.activeFrom, activeTo = A.activeTo, period = A.activeTo != null ? A.activeFrom.Date.ToString() + " - " + A.activeTo.Value.Date.ToString() : A.activeFrom.Date.ToString() }) .WhereIf(!input.Filter.IsNullOrWhiteSpace(), u => u.projectName.ToLower().Contains(input.Filter.ToLower()) || u.docCode.ToLower().Contains(input.Filter.ToLower()) || u.mappingTemplateCode.ToLower().Contains(input.Filter.ToLower()) || u.activeFrom.ToString().Contains(input.Filter) || u.activeTo.ToString().Contains(input.Filter) ); var dataCount = queryMappingTemplate.Count(); List <GetMappingTemplateListDto> getMappingTemplate = new List <GetMappingTemplateListDto>(); if (dataCount != 0) { getMappingTemplate = queryMappingTemplate .OrderBy(input.Sorting) .PageBy(input) .ToList(); } return(new PagedResultDto <GetMappingTemplateListDto>( dataCount, getMappingTemplate )); }