Page 124 - 3-2
P. 124

}
                                //sum_price=sum_price+Integer.parseInt(price);
                                all_price=sum_price;


                                sum_price=0;
                            } else {
                                Log.d(" 여긴가", "7.3333333_  설마 너 else   니.....?");
                                // no products found
                                // Launch Add New product Activity
                                Intent i = new Intent(getApplicationContext(),
                                        MainActivity_tag.class);
                                // Closing all previous activities
                                i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                startActivity(i);
                            }
                        } catch (JSONException e) {
                            Log.d(" 오류남: ", e.getMessage());
                            Log.d(" 여긴가", "7.3333333_  설마 너 jsonexception   이니.....?");
                            e.printStackTrace();
                        }
                        return null;
                    }


                    /**
                     * After completing background task Dismiss the progress dialog
                     * **/
                    protected void onPostExecute(String file_url) {
                        // dismiss the dialog after getting all products
                        pDialog.dismiss();
                        // updating UI from Background Thread
                        runOnUiThread(new Runnable() {
                            public void run() {
                                /**
                                 * Updating parsed JSON data into ListView
                                 * */
                                ListAdapter adapter = new SimpleAdapter(
                                        MainActivity_allproducts.this, productsList,
                                        R.layout.list_item, new String[] { TAG_CODE,
                                        TAG_NAME,TAG_NUM,TAG_PRICE},
                                        new int[] { R.id.txtcode, R.id.txtname,R.id.txtnum,R.id.txtprice});
                                Log.d(" 여긴가", "7.4_allproducts");
                                // updating listview
                                setListAdapter(adapter);






                                                         - 124 -
   119   120   121   122   123   124   125   126   127   128   129