Controllers updates
This commit is contained in:
@@ -327,8 +327,6 @@ namespace Business.Business.Sales
|
||||
/// </remarks>
|
||||
|
||||
public void AddAmount(int productId ,double Amount)
|
||||
{
|
||||
if (currentUser.RoleId > 1)
|
||||
{
|
||||
var product = Get(productId);
|
||||
if (product != null)
|
||||
@@ -341,11 +339,6 @@ namespace Business.Business.Sales
|
||||
throw new ArgumentException("Product id not valid!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Insufficient Role!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds to the amount of a given product.
|
||||
@@ -358,8 +351,6 @@ namespace Business.Business.Sales
|
||||
/// </remarks>
|
||||
|
||||
public void AddAmount(string productName, double Amount)
|
||||
{
|
||||
if (currentUser.RoleId > 1)
|
||||
{
|
||||
var product = Get(productName);
|
||||
if (product != null)
|
||||
@@ -372,12 +363,6 @@ namespace Business.Business.Sales
|
||||
throw new ArgumentException("Product name not valid!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Insufficient Role!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts to the amount of a given product.
|
||||
/// </summary>
|
||||
@@ -413,8 +398,6 @@ namespace Business.Business.Sales
|
||||
/// </remarks>
|
||||
|
||||
public void RemoveAmount(string productName, double Amount)
|
||||
{
|
||||
if (currentUser.RoleId > 1)
|
||||
{
|
||||
var product = Get(productName);
|
||||
if (product != null)
|
||||
@@ -427,11 +410,6 @@ namespace Business.Business.Sales
|
||||
throw new ArgumentException("Product id not valid!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Insufficient Role!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given product.
|
||||
|
Reference in New Issue
Block a user