Exemple #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));
        }
        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));
        }
        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));
        }