Exemple #1
0
        public string GetStore(int storeId)
        {
            Store storeAnse = StoreService.GetStore(storeId);

            if (storeAnse == null)
            {
                throw new Exception("store not found");
            }
            else
            {
                return(JsonHandler.SerializeObject(storeAnse));
            }
        }
Exemple #2
0
        public List <Product> getAllProductsForStore(int storeId)
        {
            Store storeAns = StoreService.GetStore(storeId);

            if (storeAns == null)
            {
                return(new List <Product>());
            }
            else
            {
                return(storeAns.getAllProducst());
            }
        }
Exemple #3
0
        public string GetStore(int storeId)
        {
            Store ret;

            try
            {
                ret = StoreService.GetStore(storeId);
                return(objDynamicJson(ret));
            }
            catch (Exception e)
            {
                return(generateMessageFormatJason(e.Message));
            }
        }