public async Task <CustomTabDto> UpdateCustomTab(CreateCustomTemplateTabRequest createCustomTemplateTabRequest) { var tab = await _customTabRepository.FindByIdAsync(createCustomTemplateTabRequest.Id); var tabDetail = await _customTabRepository.UpdateAsync(tab, tab.Id); if (tabDetail == null) { return(new CustomTabDto()); } return(MapCustomTabDto(tabDetail)); }
public async Task <CustomTabDto> AddCustomTemplateTab(CreateCustomTemplateTabRequest createCustomTemplateTabRequest) { var tab = new Domain.CustomEntity.CustomTab { Id = createCustomTemplateTabRequest.Id, Name = createCustomTemplateTabRequest.Caption, CustomEntityId = createCustomTemplateTabRequest.CustomTemplateId, IsArchived = false, IsDeleted = false, AddedBy = 1, AddedDate = DateTime.UtcNow }; var response = await _customTabRepository.AddAsync(tab); return(MapCustomTabDto(response)); }
public async Task <IActionResult> Put([FromBody] CreateCustomTemplateTabRequest createCustomTemplateTabRequest) { var response = await _customEntityManagementService.UpdateCustomTab(createCustomTemplateTabRequest); return(Ok(response)); }