예제 #1
0
        public async Task <IActionResult> Edit(string id, [Bind("NavigationItemTenantId,ParentId,NavigationItemId,Sequence,Inherited")] NavigationItemNavigationItem navigationItemNavigationItem)
        {
            if (id != navigationItemNavigationItem.NavigationItemTenantId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(navigationItemNavigationItem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NavigationItemNavigationItemExists(navigationItemNavigationItem.NavigationItemTenantId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(navigationItemNavigationItem));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,ClientId,TopicId,ViewId,Rtype")] NavigationItemViewSingle navigationItemViewSingle)
        {
            if (id != navigationItemViewSingle.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(navigationItemViewSingle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NavigationItemViewSingleExists(navigationItemViewSingle.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(navigationItemViewSingle));
        }
        public async Task <IActionResult> Edit(string id, [Bind("TenantId,Id,StoredType,Owner,DefaultName,DefaultDescription,Source,ImageUrl,LargeImageUrl,IsMobile,DocumentMode")] NavigationItem navigationItem)
        {
            if (id != navigationItem.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(navigationItem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NavigationItemExists(navigationItem.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(navigationItem));
        }
예제 #4
0
        public async Task <IActionResult> Edit(string id, [Bind("NavigationGroupTenantId,Member,Type,NavigationGroupId")] NavigationMembership navigationMembership)
        {
            if (id != navigationMembership.NavigationGroupTenantId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(navigationMembership);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NavigationMembershipExists(navigationMembership.NavigationGroupTenantId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(navigationMembership));
        }