Page 94 - 3-2
P. 94

Log.d(" 여긴가 code:", code);
                            String link = "http://192.168.0.85/delete_product_table1.php?code="+code;


                            URL url = new URL(link);
                            Log.d(" 여긴가", "8");


                            HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
                            Log.d(" 여긴가", "8-1");
                            BufferedReader           in         =           new           BufferedReader(new
            InputStreamReader(urlConnection.getInputStream()));
                            Log.d(" 여긴가", "8-2");


                            StringBuffer sb = new StringBuffer("");
                            String line="";
                            Log.d(" 여긴가", "8-3");


                            while ((line = in.readLine()) != null) {
                                Log.d(" 여긴가", "8-4");
                                sb.append(line);
                                Log.d(sb.toString(),"created result");
                                Log.d(" 여긴가", "9");
                                Log.d(" 여긴가", sb.toString());
                                break;
                            }


                            in.close();
                            Intent go = new Intent(getApplicationContext(),MainActivity_allproducts.class);
                            startActivity(go);
                            Log.d(" 여긴가", "8");


                            return sb.toString();
                        } catch(Exception e){
                            Log.d(" 오류남: ", e.getMessage());
                            return new String("Exception: " + e.getMessage());
                        }
                    }


                    /**
                     * After completing background task Dismiss the progress dialog
                     * **/
                    protected void onPostExecute(String file_url) {
                        // dismiss the dialog once product deleted
                        pDialog.dismiss();
                    }
                }


                                                         - 94 -
   89   90   91   92   93   94   95   96   97   98   99