public async Task <IActionResult> Create([Bind("ID,CustID,CustName,CustAge,CustJob")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(customer)); }
public async Task <IActionResult> Create([Bind("ID,ShipID,Destination,CargoTag,ShippingDate,ShippingStatus")] Shipping shipping) { if (ModelState.IsValid) { _context.Add(shipping); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(shipping)); }
public async Task <IActionResult> Create([Bind("ID,WarehouseNo,WarehouseLocation,WarehouseCapacity")] Warehouse warehouse) { if (ModelState.IsValid) { _context.Add(warehouse); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(warehouse)); }
public async Task <IActionResult> Create([Bind("ID,CargoWeight,CargoMaterial,WarehouseNo,CargoTag")] Cargocargo cargocargo) { if (ModelState.IsValid) { _context.Add(cargocargo); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cargocargo)); }
public async Task <IActionResult> Create([Bind("ID,AgentID,AgentName,AgentCompany,AgentRole")] Agent agent) { if (ModelState.IsValid) { _context.Add(agent); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(agent)); }