public async Task <IActionResult> Create([Bind("CustomerID,LastAmount,Balance")] Deposit deposit) { if (ModelState.IsValid) { _context.Add(deposit); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(deposit)); }
public async Task <bool> Add(Site site) { if (customerRepository.IsIDExists(site.CustomerID)) { _context.Add(site); await _context.SaveChangesAsync(); return(true); } return(false); }
public async Task <IActionResult> Create([Bind("OrderID,CustomerCID,PriceAmount,TansportAmount,AdvanceBalance")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(order)); }
public async Task <IActionResult> Create([Bind("ProductID,ProductName,Price,Rate")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <bool> Add(Customer customer) { if (!IsIDExists(customer.CustomerCID)) { _context.Add(customer); await _context.SaveChangesAsync(); return(true); } return(false); }