Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("AmazonPurchaseId,Quantity,Description,PurchasePrice,URL,ShippingCost")] AmazonPurchase amazonPurchase)
        {
            if (ModelState.IsValid)
            {
                _context.Add(amazonPurchase);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(amazonPurchase));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("CustomerId,Name,TicketNumber")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("LaborId,Quantity,Description,LaborCost")] Labor labor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(labor);
                await _context.SaveChangesAsync();

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