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