public bool SaveProductDetails(int id, string name, decimal price, string description, int quantity, string adminId) { StockDetail newStock = new StockDetail { ProductId = id, ProductName = name, QuantityAvailable = quantity, Price = price, ProductAddedBy = adminId, ProductDescription = description }; return(accessDB.SaveProduct(newStock)); }
public bool SaveProductDetails(long productId, string productName, decimal quantity, decimal buyingPrice, decimal retailPrice, decimal wholesalePrice, decimal creditPrice, int gstPercentage) { StockDetail newStock = new StockDetail { ProductId = Convert.ToInt64(productId), ProductName = productName, Quantity = quantity, BuyingPrice = Math.Round(buyingPrice, 2), RetailPrice = Math.Round(retailPrice, 2), WholesalePrice = Math.Round(wholesalePrice, 2), CreditPrice = Math.Round(creditPrice, 2), GSTPercentage = gstPercentage }; return(accessDB.SaveProduct(newStock)); }