Beispiel #1
0
        public async Task <IActionResult> Create(Enrollments enrollments)
        {
            if (ModelState.IsValid)
            {
                _context.Add(enrollments);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(enrollments));
        }
        public async Task <IActionResult> Create([Bind("Id,Startdate,Enddate,Reference,Invoice,Department,Costcenter,Account,ProjectCode,Description,Contractor,LaborPrice,MaterialPrice,StateProject,Userid,Comment,State,CreatedAt,UpdatedAt,Idteam")] Ots ots)
        {
            if (ModelState.IsValid)
            {
                _context.Add(ots);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(ots));
        }
Beispiel #3
0
        public async Task <IActionResult> Create(Qualification qualification)
        {
            if (ModelState.IsValid)
            {
                _context.Add(qualification);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdCourseNote"]  = new SelectList(_context.Enrollments, "IdEnrollment", "IdEnrollment", qualification.IdCourseNote);
            ViewData["IdStudentNote"] = new SelectList(_context.Enrollments, "IdEnrollment", "IdEnrollment", qualification.IdStudentNote);
            return(View(qualification));
        }