Example #1
0
        public async Task <IActionResult> Create([Bind("EducationId,EducationField,EducationYears")] Education education)
        {
            if (ModelState.IsValid)
            {
                _context.Add(education);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(education));
        }
        public async Task <IActionResult> Create([Bind("SalaryId,HourlyRate,OverTime,MonthlyIncome")] Salary salary)
        {
            if (ModelState.IsValid)
            {
                _context.Add(salary);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(salary));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("WorkRid,Promo,NumOfComp,YearsAtCurrComp,YearsRole,TotalWorkingYears")] WorkRecord workRecord)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workRecord);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workRecord));
        }
Example #4
0
        public async Task <IActionResult> Create([Bind("DepartmentId,DepartmentType,BusinessTravel,JobRole,JobLevel,JobInvolve")] Department department)
        {
            if (ModelState.IsValid)
            {
                _context.Add(department);
                await _context.SaveChangesAsync();

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