diff --git a/LuminousSales/Business/Business/Sales/DealController.cs b/LuminousSales/Business/Business/Sales/DealController.cs
index 0f23917..6d71199 100644
--- a/LuminousSales/Business/Business/Sales/DealController.cs
+++ b/LuminousSales/Business/Business/Sales/DealController.cs
@@ -228,7 +228,7 @@ namespace Business.Business.Sales
/// Requires Manager Role or better.
///
///
- /// Accepts product id for getting the product
+ /// Accepts deal id for getting the product
///
public void Delete(int id)
diff --git a/LuminousSales/Business/Business/Sales/StockController.cs b/LuminousSales/Business/Business/Sales/StockController.cs
index 678b296..1f73d3b 100644
--- a/LuminousSales/Business/Business/Sales/StockController.cs
+++ b/LuminousSales/Business/Business/Sales/StockController.cs
@@ -56,7 +56,7 @@ namespace Business.Business.Sales
/// Requires no special roles.
///
///
- /// Returns a ICollection of all Deals.
+ /// Returns a ICollection of all Stocks.
///
public ICollection GetAll()
@@ -79,7 +79,7 @@ namespace Business.Business.Sales
/// Requires Manager role or better.
///
///
- /// Returns an object of the role with the given Id.
+ /// Returns an object of the stock with the given Id.
///
public Stock Get(int id)
@@ -116,6 +116,17 @@ namespace Business.Business.Sales
}
}
+ ///
+ /// Gets stocks made by certain user.
+ ///
+ ///
+ /// Accepts user id for getting the user.
+ /// Requires Admin role.
+ ///
+ ///
+ /// Returns an Collection of all the stocks in the criteria.
+ ///
+
public ICollection GetByUser(int id)
{
if (currentUser != null || currentUser.RoleId == 3)
@@ -136,6 +147,17 @@ namespace Business.Business.Sales
}
}
+ ///
+ /// Gets stocks made by certain user.
+ ///
+ ///
+ /// Accepts username for getting the user.
+ /// Requires Admin role.
+ ///
+ ///
+ /// Returns an Collection of all the stocks in the criteria.
+ ///
+
public ICollection GetByUser(string username)
{
if (currentUser != null || currentUser.RoleId == 3)
@@ -156,6 +178,16 @@ namespace Business.Business.Sales
}
}
+ ///
+ /// Adds Stock to the database.
+ ///
+ ///
+ /// Requires Manager role or better.
+ ///
+ ///
+ /// Accepts product id for getting the product, amount sold and time of transaction.
+ ///
+
public void Add(int productId, double Amount, DateTime time)
{
if (currentUser.RoleId > 1)
@@ -179,6 +211,16 @@ namespace Business.Business.Sales
}
}
+ ///
+ /// Adds Stock to the database.
+ ///
+ ///
+ /// Requires Manager role or better.
+ ///
+ ///
+ /// Accepts product name for getting the product, amount sold and time of transaction.
+ ///
+
public void Add(string productName, double Amount, DateTime time)
{
if (currentUser.RoleId > 1)
@@ -205,6 +247,16 @@ namespace Business.Business.Sales
}
+ ///
+ /// Deletes Deal from the database.
+ ///
+ ///
+ /// Requires Manager Role or better.
+ ///
+ ///
+ /// Accepts stock id for getting the product
+ ///
+
public void Delete(int id)
{
if (currentUser.RoleId == 3 )