コード例 #1
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Title,TableName,IdTab")] SsmsColumn ssmsColumn)
        {
            if (id != ssmsColumn.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ssmsColumn);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SsmsColumnExists(ssmsColumn.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdTab"] = new SelectList(_context.SsmsTable, "Id", "Id", ssmsColumn.IdTab);
            return(View(ssmsColumn));
        }
コード例 #2
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Title")] SsmsInstances ssmsInstances)
        {
            if (id != ssmsInstances.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ssmsInstances);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SsmsInstancesExists(ssmsInstances.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(ssmsInstances));
        }
コード例 #3
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Title,IdBd")] SsmsProcedures ssmsProcedures)
        {
            if (id != ssmsProcedures.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ssmsProcedures);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SsmsProceduresExists(ssmsProcedures.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdBd"] = new SelectList(_context.SsmsDatabases, "Id", "Title", ssmsProcedures.IdBd);
            return(View(ssmsProcedures));
        }