public async Task<IActionResult> Create([Bind("StockID,ItemName,ImagePath,OrgID")] StockList stockList)
 {
     if (ModelState.IsValid)
     {
         _context.Add(stockList);
         await _context.SaveChangesAsync();
         return RedirectToAction(nameof(Index));
     }
     return View(stockList);
 }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ReqID,UserID,OrgID,StockID,ReqDesc,ReqItems,ReqStatus")] Requests requests)
        {
            if (ModelState.IsValid)
            {
                _context.Add(requests);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(requests));
        }
        public async Task <IActionResult> Create([Bind("StockID,ItemName,Quantity,OrgID")] Inventory inventory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(inventory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(inventory));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("UserID,UserName,FirstName,LastName,OrgID,AuthLevel")] Users users)
        {
            if (ModelState.IsValid)
            {
                _context.Add(users);
                await _context.SaveChangesAsync();

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