Exemple #1
0
        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 !");
            }
        }
Exemple #2
0
        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();
            }
        }
Exemple #3
0
        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();
            }
        }
Exemple #4
0
 public List <skStock> GetStockList(skStock SearchFilterObj)
 {
     return(DATA.GetStockList(SearchFilterObj).ToList <skStock>());
 }