예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,CustomerName,CustomerAddress,CustomerNumber,TotalWeight,NoParcels,TotalValue")] Waybill waybill)
        {
            if (ModelState.IsValid)
            {
                _context.Add(waybill);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(waybill));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("Id,BranchName,BranchEmail,PhoneNumber,PhysicalAddress,Manager")] Branch branch)
        {
            if (ModelState.IsValid)
            {
                _context.Add(branch);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(branch));
        }
예제 #3
0
        public async Task <IActionResult> Create([Bind("Id,Make,Model,Mileage,Description")] Vehicle vehicle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vehicle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vehicle));
        }