public async Task <IActionResult> Edit(int id, [Bind("ApplicationId,ApplicationName,Description,Owner,SecAppExpert,ISContact,FileName")] Application application)
        {
            if (id != application.ApplicationId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(application);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ApplicationExists(application.ApplicationId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(application));
        }
        public async Task <IActionResult> Edit(int id, [Bind("KeywordId,KeywordDefinitionId,KeywordDefinitionName,Field1,Field2,Field3,Field4,Field5,Field6,Field7,Field8,Field9,Field10,Field11,Field12,Field13,Field14,Field15,Field16,Field17,Field18,Field19,Field20,Field21,Field22,Field23,Field24,Field25")] Keyword keyword)
        {
            if (id != keyword.KeywordId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(keyword);
                    await _context.SaveChangesAsync();

                    var thisDef = _dataDictionaryRepository.GetDefinitionById(keyword.KeywordDefinitionId);
                    if (thisDef != null)
                    {
                        keyword.KeywordDefinitionName = thisDef.KeywordDefinitionName;
                        _context.SaveChanges();
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KeywordExists(keyword.KeywordId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["KeywordDefinitionId"] = new SelectList(_context.KeywordDefinitions, "KeywordDefinitionId", "KeywordDefinitionName", keyword.KeywordDefinitionId);
            return(View(keyword));
        }
        public async Task <IActionResult> Edit(int id, [Bind("KeywordDefinitionId,KeywordDefinitionName,ApplicationId,ApplicationName,Field1Description,Field2Description,Field3Description,Field4Description,Field5Description,Field6Description,Field7Description,Field8Description,Field9Description,Field10Description,Field11Description,Field12Description,Field13Description,Field14Description,Field15Description,Field16Description,Field17Description,Field18Description,Field19Description,Field20Description,Field21Description,Field22Description,Field23Description,Field24Description,Field25Description")] KeywordDefinition keywordDefinition)
        {
            if (id != keywordDefinition.KeywordDefinitionId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(keywordDefinition);
                    await _context.SaveChangesAsync();

                    var thisApp = _dataDictionaryRepository.GetApplicationById(keywordDefinition.ApplicationId);
                    if (thisApp != null)
                    {
                        keywordDefinition.ApplicationName = thisApp.ApplicationName;
                        _context.SaveChanges();
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KeywordDefinitionExists(keywordDefinition.KeywordDefinitionId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ApplicationId"] = new SelectList(_context.Applications, "ApplicationId", "ApplicationName", keywordDefinition.ApplicationId);
            return(View(keywordDefinition));
        }