public async Task UpdateTenderReport(Guid templateReportId, ReportCreateDTO reportCreateDTO) { var entity = _mapper.Map <Data.Entities.TenderReport>(reportCreateDTO); entity.ParticularName = TenderHelperService.ToTitleCase(entity.ParticularName); await _repository.UpdateTenderReport(templateReportId, entity); }
public async Task UpdateExpenditure(string ExpenditureCode, CodesCreateDTO ExpendituresDTO) { var entity = _mapper.Map <ExpenditureType>(ExpendituresDTO); entity.ShortName = TenderHelperService.ToTitleCase(entity.ShortName); await _repository.UpdateExpenditure(ExpenditureCode, entity); }
public async Task UpdateTender(string tenderCode, CodesCreateDTO tendersDTO) { var entity = _mapper.Map <TenderType>(tendersDTO); entity.ShortName = TenderHelperService.ToTitleCase(entity.ShortName); await _repository.UpdateTender(tenderCode, entity); }
public async Task CreateExpenditure(CodesCreateDTO ExpendituresDTO) { var entity = _mapper.Map <ExpenditureType>(ExpendituresDTO); entity.Code = Regex.Replace(entity.Code, @"\s+", ""); entity.Code = TenderHelperService.ToTitleCase(entity.Code); entity.ShortName = TenderHelperService.ToTitleCase(entity.ShortName); await _repository.CreateExpenditure(entity); }
public async Task CreateTender(CodesCreateDTO tendersDTO) { var entity = _mapper.Map <TenderType>(tendersDTO); entity.Code = Regex.Replace(entity.Code, @"\s+", ""); entity.Code = entity.Code.ToUpper(); entity.ShortName = TenderHelperService.ToTitleCase(entity.ShortName); await _repository.CreateTender(entity); }
public async Task <bool> ExpenditureExists(string code) { code = Regex.Replace(code, @"\s+", ""); return(await _repository.ExpenditureExists(TenderHelperService.ToTitleCase(code))); }