public ActionResult DisplayProduct() { genericProduct genericProduct = new genericProduct("Select"); List <Product> productList = new List <Product>(); productList = genericProduct.SelectAll(); return(View(productList)); }
public ActionResult addSaleData(int id, int curntQ) { genericProduct genericProduct = new genericProduct("Select"); prodid = id; curentQ = curntQ; List <Product> productList = new List <Product>(); productList = genericProduct.SelectAll(); Product product = new Product(); foreach (var item in productList) { if (item.id == id) { product = item; productname = item.ProductName; } } return(View(product)); }