public async Task <IActionResult> Create([Bind("Id,Name,Premium,EmployeeId")] Project project) { if (ModelState.IsValid) { _context.Add(project); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(project)); }
public async Task <IActionResult> Create([Bind("Id,DateCreated,ExamDate,ResultsDate,Description,Hemoglobin,Hematocrit,WhiteBloodCellCount,RedBloodCellCount")] Blood blood) { if (ModelState.IsValid) { _context.Add(blood); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(blood)); }
public async Task <IActionResult> Create([Bind("WorkId,Company,WorkTitle,WorkLength,Description")] Works works) { if (ModelState.IsValid) { _context.Add(works); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(works)); }
public async Task <IActionResult> Create([Bind("ID,EQPID")] Work work) { if (ModelState.IsValid) { _context.Add(work); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(work)); }
public async Task <IActionResult> Create([Bind("EmployeeId,FullName,Position")] Employee employee) { if (ModelState.IsValid) { _context.Add(employee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employee)); }
public IActionResult PostWork(string name, int id) { var work = new Work() { work_Name = name, comp_Id = id }; _context.Add(work); _context.SaveChanges(); return(Ok("Created")); }