Created
March 31, 2010 11:52
-
-
Save davetheninja/350222 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int GetTotalStock(Guid ProductGuid) | |
{ | |
DataSet dsStock = new ProductsService().GetStockCount(ProductGuid); | |
if (dsStock.Tables != null) | |
{ | |
if (dsStock.Tables[0].Rows.Count > 0) | |
{ | |
if (dsStock.Tables[0].Rows[0]["TotalStock"] != null) | |
{ | |
return int.Parse(dsStock.Tables[0].Rows[0]["TotalStock"].ToString()); | |
} | |
else | |
{ | |
return 0; | |
} | |
} | |
else | |
{ | |
return 0; | |
} | |
} | |
else | |
{ | |
return 0; | |
} | |
} |
Just stumbled across this bad boy clearing out an old server :-) Priceless!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OMG ;-)