Esempio n. 1
0
        public async Task <IActionResult> Create([Bind("CustomerID,CustomerName,ContactNumber,Expenses")] Clients clients)
        {
            if (ModelState.IsValid)
            {
                _context.Add(clients);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(clients));
        }
Esempio n. 2
0
        public async Task <IActionResult> Create([Bind("ProductID,ProductName,Company,Charges")] Product product)
        {
            if (ModelState.IsValid)
            {
                _context.Add(product);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(product));
        }
Esempio n. 3
0
        public async Task <IActionResult> Create([Bind("SaloonID,SaloonName,SaloonAddress,Contact_Number")] Saloon saloon)
        {
            if (ModelState.IsValid)
            {
                _context.Add(saloon);
                await _context.SaveChangesAsync();

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