public async Task <IActionResult> Create([Bind("JobRoleCode,Job")] JobRole jobRole) { if (ModelState.IsValid) { _context.Add(jobRole); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(jobRole)); }
public async Task <IActionResult> Create([Bind("Age,Attrition,BusinessTravel,DailyRate,Department,DistanceFromHome,Education,EducationField,EmployeeCount,EmployeeNumber,EnvironmentSatisfaction,Gender,HourlyRate,JobInvolvement,JobLevel,JobRole,JobSatisfaction,MaritalStatus,MonthlyIncome,MonthlyRate,NumCompaniesWorked,Over18,OverTime,PercentSalaryHike,PerformanceRating,RelationshipSatisfaction,StandardHours,StockOptionLevel,TotalWorkingYears,TrainingTimesLastYear,WorkLifeBalance,YearsAtCompany,YearsInCurrentRole,YearsSinceLastPromotion,YearsWithCurrManager")] DatasetTb datasetTb) { if (ModelState.IsValid) { _context.Add(datasetTb); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(datasetTb)); }
public async Task <IActionResult> Create([Bind("EducationCode,EducationDescription")] EducationField educationField) { if (ModelState.IsValid) { _context.Add(educationField); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(educationField)); }
public async Task <IActionResult> Create([Bind("EmployeeNumber,Age,Gender,MaritalStatus,EmployeeCount")] EmployeeDetail employeeDetail) { if (ModelState.IsValid) { _context.Add(employeeDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employeeDetail)); }
public async Task <IActionResult> Create([Bind("EmployeeHistoryId,YearsAtCompany,YearsInCurrentRole,YearsSinceLastPromotion,YearsWithCurrManager,EnvironmentSatisfaction,RelationshipSatisfaction,StandardHours,StockOptionLevel,TotalWorkingYears,TrainingTimesLastYear,WorkLifeBalance,PerformanceRating,PercentSalaryHike,MonthlyIncome,MonthlyRate,NumCompaniesWorked,Over18,OverTime,Attrition,BusinessTravel,DailyRate,EmployeeNumber")] EmployeeHistory employeeHistory) { if (ModelState.IsValid) { _context.Add(employeeHistory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["EmployeeNumber"] = new SelectList(_context.EmployeeDetail, "EmployeeNumber", "Gender", employeeHistory.EmployeeNumber); return(View(employeeHistory)); }
public async Task <IActionResult> Create([Bind("EmployeeNumber,EducationCode,EducationCount")] EmployeeEducationInfo employeeEducationInfo) { if (ModelState.IsValid) { _context.Add(employeeEducationInfo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["EducationCode"] = new SelectList(_context.EducationField, "EducationCode", "EducationDescription", employeeEducationInfo.EducationCode); ViewData["EmployeeNumber"] = new SelectList(_context.EmployeeDetail, "EmployeeNumber", "Gender", employeeEducationInfo.EmployeeNumber); return(View(employeeEducationInfo)); }