nhannguyenbt
3 Aug 2012, 8:17 PM
Hi guys,
First, sorry for my English skill :">
I'm a newbie and i have a question:
I use Json and NestedList to binding data for my Application
Here is my json data:
{
"items": [
{
"id": 1,
"text": "Fashion",
"img_tmb": "resources/images/products/sominam.jpg",
"leaf": true,
"products": [
{
"id": 11,
"text": "Jean",
"weight": "120/25 grm",
"price": 27,
"img_tmb": "resources/images/products/jean.jpg",
"leaf": true
},
{
"id": 12,
"text": "kaki",
"weight": "100 grm",
"price": 34,
"img_tmb": "resources/images/products/kaki.jpg",
"leaf": true
}]
},
"id": 2,
"text": "Food",
...................
}
That mean I just get products from Fashion and Food category.
Now I want to put the Shop into database. It look like:
Category(Cat_ID, Cat_name)
Shop(Shop_ID, Shop_name, Cat_ID)
Product(Pro_ID, Pro_name, Shop_ID, Cat_ID)
I want to creat 2 tab panels call Category and Shop,
if I click on Category, app will show the list of Category -> products.
if I click on Shop panel, app will show the list of Shop -> products
So how do I create database and binding data into my app
Thanks and best regard.
(Sorry for my English skill :D)
First, sorry for my English skill :">
I'm a newbie and i have a question:
I use Json and NestedList to binding data for my Application
Here is my json data:
{
"items": [
{
"id": 1,
"text": "Fashion",
"img_tmb": "resources/images/products/sominam.jpg",
"leaf": true,
"products": [
{
"id": 11,
"text": "Jean",
"weight": "120/25 grm",
"price": 27,
"img_tmb": "resources/images/products/jean.jpg",
"leaf": true
},
{
"id": 12,
"text": "kaki",
"weight": "100 grm",
"price": 34,
"img_tmb": "resources/images/products/kaki.jpg",
"leaf": true
}]
},
"id": 2,
"text": "Food",
...................
}
That mean I just get products from Fashion and Food category.
Now I want to put the Shop into database. It look like:
Category(Cat_ID, Cat_name)
Shop(Shop_ID, Shop_name, Cat_ID)
Product(Pro_ID, Pro_name, Shop_ID, Cat_ID)
I want to creat 2 tab panels call Category and Shop,
if I click on Category, app will show the list of Category -> products.
if I click on Shop panel, app will show the list of Shop -> products
So how do I create database and binding data into my app
Thanks and best regard.
(Sorry for my English skill :D)