コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        public async Task <IActionResult> Put([FromBody] CreateCustomTemplateTabRequest createCustomTemplateTabRequest)
        {
            var response = await _customEntityManagementService.UpdateCustomTab(createCustomTemplateTabRequest);

            return(Ok(response));
        }