public async Task <IActionResult> Create([Bind("UserId,UserName,MobileNumber,Address,Email,Password")] Users users) { if (ModelState.IsValid) { _context.Add(users); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(users)); }
public async Task <IActionResult> Create([Bind("ShipmentId,DateStamp")] Shipments shipments) { if (ModelState.IsValid) { _context.Add(shipments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(shipments)); }
public async Task <IActionResult> Create([Bind("OrderNumber,OrderId,SellerId,Quantity,TotalPrice,Tax,DateStamp,Freight")] OrderDetails orderDetails) { if (ModelState.IsValid) { _context.Add(orderDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(orderDetails)); }
public async Task <IActionResult> Create([Bind("PaymentId,UserId,ModeOfPayment,DateStamp,Amount")] Payments payments) { if (ModelState.IsValid) { _context.Add(payments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(payments)); }
public async Task <IActionResult> Create([Bind("AccountNumber,SellerId,BankName,IFSC,MobileNumber")] SellerAccounts sellerAccounts) { if (ModelState.IsValid) { _context.Add(sellerAccounts); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sellerAccounts)); }
public async Task <IActionResult> Create([Bind("CategoryId,Description,CategoryName")] Categories categories) { if (ModelState.IsValid) { _context.Add(categories); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(categories)); }
public async Task <IActionResult> Create([Bind("SellerId,SellerName,MobileNumber,Address,Email,GSTNumber,AccountNumber")] Sellers sellers) { if (ModelState.IsValid) { _context.Add(sellers); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["AccountNumber"] = new SelectList(_context.SellerAccounts, "AccountNumber", "BankName", sellers.AccountNumber); return(View(sellers)); }
public async Task <IActionResult> Create([Bind("ProductId,SellerId,ProductName,MRP,SellingPrice,Discount,Vendor,CategoryId,Description")] Products products) { if (ModelState.IsValid) { _context.Add(products); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CategoryId"] = new SelectList(_context.Categories, "CategoryId", "CategoryName", products.CategoryId); ViewData["SellerId"] = new SelectList(_context.Sellers, "SellerId", "Address", products.SellerId); return(View(products)); }
public async Task <IActionResult> Create([Bind("OrderId,ProductId,SellerId,UserId,OrderNumber,ShipmentId,PaymentId,DateStamp,EstimatedDeliveryDate")] Orders orders) { if (ModelState.IsValid) { _context.Add(orders); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["OrderNumber"] = new SelectList(_context.OrderDetails, "OrderNumber", "OrderNumber", orders.OrderNumber); ViewData["PaymentId"] = new SelectList(_context.Payments, "PaymentId", "ModeOfPayment", orders.PaymentId); ViewData["ProductId"] = new SelectList(_context.Products, "ProductId", "Description", orders.ProductId); ViewData["ShipmentId"] = new SelectList(_context.Shipments, "ShipmentId", "ShipmentId", orders.ShipmentId); ViewData["UserId"] = new SelectList(_context.Users, "UserId", "Address", orders.UserId); return(View(orders)); }