public async Task <IActionResult> Create([Bind("WorkOrderID,WorkOrderType,PropertyInfo,SchedulingManager,TechInfo,CurrentStatus,ProposedDate,ScheduledDate")] WorkOrder workOrder) { if (ModelState.IsValid) { _context.Add(workOrder); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(workOrder)); }
public async Task <IActionResult> Create([Bind("Id,WorkOrderID,ColumnChanged,OldValue,NewValue,Timestamp")] WorkOrderHistory workOrderHistory) { if (ModelState.IsValid) { _context.Add(workOrderHistory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["WorkOrderID"] = new SelectList(_context.WorkOrders, "WorkOrderID", "WorkOrderID", workOrderHistory.WorkOrderID); return(View(workOrderHistory)); }