public IActionResult AddPayment(int id, decimal amount) { var db = new BlessDiamondRepository(_connectionString); db.AddPayment(id, amount); return(Json(DateTime.Now)); }
public IActionResult AddSale(Product product, Buyer buyer, History history) { var db = new BlessDiamondRepository(_connectionString); db.AddSale(product, buyer, history); return(Redirect("/home/ViewAllSales")); }
public IActionResult ViewSale(int id) { var db = new BlessDiamondRepository(_connectionString); return(View(db.GetSale(id))); }
public IActionResult ViewAllSales() { var db = new BlessDiamondRepository(_connectionString); return(View(db.GetAllSales())); }