Exemplo n.º 1
0
        public string GetAllStores()
        {
            List <Store> ret;

            try
            {
                ret = StoreService.GetAllStores();
                return(objDynamicJson(ret));
            }
            catch (Exception e)
            {
                return(generateMessageFormatJason(e.Message));
            }
        }
Exemplo n.º 2
0
        public string GetAllStores()
        {
            //Store s2 = StoreService.GetStore(2);
            //foreach (Stock st in s2.Stocks)
            //{
            //    int i = st.id;
            //}

            /*
             * List<Store> ls = StoreService.GetAllStores();
             * //jonathan: i just wrote this for debug
             * foreach (Store s in ls)
             * {
             *  foreach (Stock st in s.Stocks)
             *  {
             *      int i = st.id;
             *  }
             * }
             */

            List <Store> ls = StoreService.GetAllStores();

            return(JsonHandler.SerializeObject(ls));
        }