public async Task <IActionResult> Edit(int id, [Bind("SemestrFormKontrolNameId,FormKontrolNameId,SemestrId")] SemestrFormKontrolName semestrFormKontrolName, int SemestrId)
        {
            if (id != semestrFormKontrolName.SemestrFormKontrolNameId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(semestrFormKontrolName);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SemestrFormKontrolNameExists(semestrFormKontrolName.SemestrFormKontrolNameId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), new { SemestrId }));
            }
            ViewData["FormKontrolNameId"] = new SelectList(_context.FormKontrolNames, "FormKontrolNameId", "FormKontrolNameName", semestrFormKontrolName.FormKontrolNameId);
            return(View(semestrFormKontrolName));
        }
        public async Task <IActionResult> Create([Bind("SemestrFormKontrolNameId,FormKontrolNameId,SemestrId")] SemestrFormKontrolName semestrFormKontrolName, int?SemestrId)
        {
            if (ModelState.IsValid)
            {
                _context.Add(semestrFormKontrolName);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { SemestrId }));
            }

            ViewBag.SemestrId             = SemestrId;
            ViewData["FormKontrolNameId"] = new SelectList(_context.FormKontrolNames, "FormKontrolNameId", "FormKontrolNameName", semestrFormKontrolName.FormKontrolNameId);
            return(View(semestrFormKontrolName));
        }