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));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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));
        }
Beispiel #5
0
        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));
        }