public async Task <IActionResult> Create([Bind("KodGruppy,Naimenovanie,Opisanie")] GruppyKlientov gruppyKlientov)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gruppyKlientov);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(gruppyKlientov));
        }
        public async Task <IActionResult> Create([Bind("KodRiska,Naimenovanie,Opisanie,SrednyayaVeroyatnost")] Riski riski)
        {
            if (ModelState.IsValid)
            {
                _context.Add(riski);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(riski));
        }
示例#3
0
        public async Task <IActionResult> Create([Bind("KodDolzhnosti,NaimenovanieDolzhnosti,Oklad,Obyazannosti,Trebovaniya")] Dolzhnosti dolzhnosti)
        {
            if (ModelState.IsValid)
            {
                _context.Add(dolzhnosti);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(dolzhnosti));
        }
        public async Task <IActionResult> Create([Bind("KodVidaPolisa,Naimenovanie,Opisanie,Usloviya,KodRiska")] VidyPolisov vidyPolisov)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vidyPolisov);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["KodRiska"] = new SelectList(_context.Riski, "KodRiska", "Naimenovanie", vidyPolisov.KodRiska);
            return(View(vidyPolisov));
        }
        public async Task <IActionResult> Create([Bind("KodKlienta,Fio,DataRozhdeniya,Pol,Adres,Telefon,PasportnyeDannye,KodGruppy")] Klienty klienty)
        {
            if (ModelState.IsValid)
            {
                _context.Add(klienty);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["KodGruppy"] = new SelectList(_context.GruppyKlientov, "KodGruppy", "Naimenovanie", klienty.KodGruppy);
            return(View(klienty));
        }
        public async Task <IActionResult> Create([Bind("KodSotrudnika,Fio,DataRozdeniya,Pol,Adres,Telefon,PasportnyeDannye,KodDolzhnosti")] Sotrudniki sotrudniki)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sotrudniki);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["KodDolzhnosti"] = new SelectList(_context.Dolzhnosti, "KodDolzhnosti", "NaimenovanieDolzhnosti", sotrudniki.KodDolzhnosti);
            return(View(sotrudniki));
        }
示例#7
0
        public async Task <IActionResult> Create([Bind("NomerPolisa,DataNachala,DataOkonchaniya,Stoimost,SummaVyplaty,OtmetkaOVyplate,OtmetkaObOkonchanii,KodVidaPolisa,KodKlienta,KodSotrudnika")] Polisy polisy)
        {
            if (ModelState.IsValid)
            {
                _context.Add(polisy);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["KodKlienta"]    = new SelectList(_context.Klienty, "KodKlienta", "Adres", polisy.KodKlienta);
            ViewData["KodSotrudnika"] = new SelectList(_context.Sotrudniki, "KodSotrudnika", "Adres", polisy.KodSotrudnika);
            ViewData["KodVidaPolisa"] = new SelectList(_context.VidyPolisov, "KodVidaPolisa", "Naimenovanie", polisy.KodVidaPolisa);
            return(View(polisy));
        }