public async Task <IActionResult> Create([Bind("FuncionarioId,Nome,Servico,Email,Telemovel")] Funcionario funcionario)
        {
            if (ModelState.IsValid)
            {
                _context.Add(funcionario);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(funcionario));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("ProfessorID,Nome,Email,Telemovel,Numero_De_Professor,Numero_De_Gabinete")] Professor professor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(professor);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(professor));
        }
Beispiel #3
0
        public async Task <IActionResult> Create([Bind("ServicoId,Nome,Descricao,Localizacao")] Servico servico)
        {
            if (ModelState.IsValid)
            {
                _context.Add(servico);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(servico));
        }