public FileDto GenerateExcelUploadGrossPrice(GetMsUnitByProjectClusterCategoryProductTermMain input) { var msUnitCodeNo = GetMsUnitByProjectClusterCategoryProductTermMain(input); var dataFinal = (from A in msUnitCodeNo select new GenerateTemplateExcelListDto { unitCode = A.unitCode, unitNo = A.unitNo }).ToList(); return(_generatePriceListExcelExporter.GenerateExcelUploadGrossPrice(dataFinal)); }
public List <GetMsUnitByProjectClusterDto> GetMsUnitByProjectClusterCategoryProductTermMain(GetMsUnitByProjectClusterCategoryProductTermMain input) { var getData = (from x in _contextProp.MS_Unit join z in _contextProp.MS_UnitCode on x.unitCodeID equals z.Id where x.projectID == input.projectID && x.clusterID == input.clusterID && x.categoryID == input.categoryID && x.productID == input.productID && x.termMainID == input.termMainID select new GetMsUnitByProjectClusterDto { unitNo = x.unitNo, unitCode = z.unitCode }).ToList(); if (getData.Any()) { return(getData); } else { throw new UserFriendlyException("No Unit Found!"); } }