Exemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("IdIndustry,IndustryName,DescriptionI")] Industry industry)
        {
            if (ModelState.IsValid)
            {
                _context.Add(industry);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(industry));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("IdLegalForm,FormName,DescripionL")] LegalForm legalForm)
        {
            if (ModelState.IsValid)
            {
                _context.Add(legalForm);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(legalForm));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("IdCareer,NameCareer,DescriptionCareer")] Career career)
        {
            if (ModelState.IsValid)
            {
                _context.Add(career);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(career));
        }
        public async Task <IActionResult> Create([Bind("IdGraduate,Inscription,GraduateName,LastName,Email,PasswordG,IdCareer")] Graduate graduate)
        {
            if (ModelState.IsValid)
            {
                _context.Add(graduate);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdCareer"] = new SelectList(_context.Career, "IdCareer", "NameCareer", graduate.IdCareer);
            return(View(graduate));
        }
        public async Task <IActionResult> Create([Bind("IdCompany,RecluiterName,LastName,Rfc,BusinessName,Email,PasswordR,IdIndustry,IdLegalForm")] Company company)
        {
            if (ModelState.IsValid)
            {
                _context.Add(company);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdIndustry"]  = new SelectList(_context.Industry, "IdIndustry", "IndustryName", company.IdIndustry);
            ViewData["IdLegalForm"] = new SelectList(_context.LegalForm, "IdLegalForm", "FormName", company.IdLegalForm);
            return(View(company));
        }