public static skStock GetStockObject(int stockID) { DataFunctions DB = new DataFunctions(); skStock PurchaseOBJ = DB.GetStockDetails(stockID); if (PurchaseOBJ != null) { return(PurchaseOBJ); } else { throw new Exception("No stock found !"); } }
public static skStock GetStockObject(int stockID) { Stocky.Proxies.AppDataClient StockProxie = new Proxies.AppDataClient(); try { StockProxie.Open(); skStock PurchaseOBJ = StockProxie.GetStockObject(stockID).StockObj; if (PurchaseOBJ != null) { return(PurchaseOBJ); } else { throw new Exception("No stock found !"); } } finally { StockProxie.Close(); } }
public static List <skStock> GetStockList(skStock SearchFilterObj) { Stocky.Proxies.AppDataClient DataClient = new Proxies.AppDataClient(); try { DataClient.Open(); List <skStock> ReturnList = DataClient.GetStockList(SearchFilterObj).StockList; if (ReturnList.Count != 0) { return(ReturnList); } else { throw new Exception("Result has no records!"); } } finally { DataClient.Close(); } }
public List <skStock> GetStockList(skStock SearchFilterObj) { return(DATA.GetStockList(SearchFilterObj).ToList <skStock>()); }