Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int DacpacId, [Bind("DacpacId,DacpacName,DatabaseId")] Dacpac dacpac)
        {
            if (DacpacId != dacpac.DacpacId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dacpac);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DacpacExists(dacpac.DacpacId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Manage", "Repo"));
            }
            ViewData["DatabaseId"] = new SelectList(_context.Databases, "DatabaseId", "DatabaseName", dacpac.DatabaseId);
            return(View(dacpac));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(int ProjectId, [Bind("ProjectId,ProjectName,ClientId")] Project project)
        {
            if (ProjectId != project.ProjectId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(project);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProjectExists(project.ProjectId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Manage", "Repo"));
            }
            ViewData["ClientId"] = new SelectList(_context.Clients, "ClientId", "ClientName", project.ClientId);
            return(View(project));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Edit(int InstanceId, [Bind("InstanceId,InstanceName,ProjectId")] Instance instance)
        {
            if (InstanceId != instance.InstanceId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(instance);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!InstanceExists(instance.InstanceId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Manage", "Repo"));
            }
            ViewData["ProjectId"] = new SelectList(_context.Projects, "ProjectId", "ProjectName", instance.ProjectId);
            return(View(instance));
        }